das habe ich eingebaut aber es geht immer noch net
Beiträge von [ExR]Firetube
-
-
das script gibt keine fehler aus
-
ich wollte das hud austauschen doch jetzte geht garnix mehr habe das alte wieder rein gemacht alles doch immer ist die money anzeige bei 0 selbst wen ich was von der bank abhebe
script:
Lua
Alles anzeigenfunction hudDauerhaft () showPlayerHudComponent ( "ammo", true ) showPlayerHudComponent ( "weapon", true ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "crosshair", true ) showPlayerHudComponent ( "armour", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "area_name", true ) showPlayerHudComponent ( "clock", true ) showHungerBar() end addEventHandler ( "onClientResourceStart", getRootElement(), hudDauerhaft ) addEventHandler ( "onClientElementDataChange", lp, function ( data, old ) if data == "money" then local cMoney = getPlayerMoney ( lp ) local new = getElementData ( lp, "money" ) if cMoney > new then _takePlayerMoney ( cMoney - new ) hudEinblendenMoney_func () playSoundFrontEnd ( 42 ) elseif cMoney < new then _givePlayerMoney ( (new-cMoney) ) hudEinblendenMoney_func () playSoundFrontEnd ( 42 ) end end end ) timetohide = 3000 function setRadarVisible ( bool ) showPlayerHudComponent ( "radar", bool ) end function hudAusblenden () showPlayerHudComponent ( "ammo", false ) showPlayerHudComponent ( "weapon", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "radar", false ) showPlayerHudComponent ( "area_name", false ) showPlayerHudComponent ( "clock", false ) hideWeaponFireState () ausblendentimer_dmg_started = false bindKey ( "%", "both", showall ) end addEventHandler ( "onClientResourceStart", getRootElement(), hudAusblenden ) function hudEinblendenDmg_func ( a, b, c, d, bool ) if ( source == getLocalPlayer() and not getElementData ( lp, "isInHighNoon" ) and not isPedDead ( lp ) ) or bool then showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "armour", true ) if ausblendentimer_dmg_started then killTimer ( ausblendentimer_dmg ) ausblendentimer_dmg = setTimer ( hudAusblendenDmg, timetohide, 1 ) ausblendentimer_dmg_started = true else ausblendentimer_dmg = setTimer ( hudAusblendenDmg, timetohide, 1 ) ausblendentimer_dmg_started = true end end end addEventHandler ( "onClientPlayerDamage", getRootElement (), hudEinblendenDmg_func ) function hudEinblendenSwitch ( old, new ) if source == getLocalPlayer() and not getElementData ( lp, "isInHighNoon" ) then showPlayerHudComponent ( "ammo", true ) showPlayerHudComponent ( "weapon", true ) refreshAmmoKindDraw () if fireModeWeapons[getPedWeapon( lp, new )] then showWeaponFireState ( true ) if getElementData ( lp, "playingtime" ) <= 10*60 and not gunmodeInfo then gunmodeInfo = true infobox ( "\nDeine aktuelle Waffe\nunterstuetzt mehrere\nFeuermodi. Druecke\n\"X\", um sie zu\nwechseln.", 5000, 200, 200, 0 ) end else hideWeaponFireState () end if ausblendentimer_switch_started then killTimer ( ausblendentimer_switch ) ausblendentimer_switch = setTimer ( hudAusblendenSwitch, timetohide, 1 ) ausblendentimer_switch_started = true else ausblendentimer_switch = setTimer ( hudAusblendenSwitch, timetohide, 1 ) ausblendentimer_switch_started = true end if ausblendentimer_fire_started then killTimer ( ausblendentimer_fire ) ausblendentimer_fire = setTimer ( hudAusblendenFire, timetohide, 1 ) ausblendentimer_fire_started = true else ausblendentimer_fire = setTimer ( hudAusblendenFire, timetohide, 1 ) ausblendentimer_fire_started = true end end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), hudEinblendenSwitch ) function hudEinblendenFire () if source == getLocalPlayer() and not getElementData ( lp, "isInHighNoon" ) then showPlayerHudComponent ( "ammo", true ) showWeaponFireState () if ausblendentimer_fire_started then killTimer ( ausblendentimer_fire ) ausblendentimer_fire = setTimer ( hudAusblendenFire, timetohide, 1 ) ausblendentimer_fire_started = true else ausblendentimer_fire = setTimer ( hudAusblendenFire, timetohide, 1 ) ausblendentimer_fire_started = true end end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), hudEinblendenFire ) function hudEinblendenMoney_func () showPlayerHudComponent ( "money", true ) if ausblendentimer_money_started == true then killTimer ( ausblendentimer_money ) ausblendentimer_money = setTimer ( hudAusblendenMoney, timetohide, 1 ) ausblendentimer_money_started = true else ausblendentimer_money = setTimer ( hudAusblendenMoney, timetohide, 1 ) ausblendentimer_money_started = true end end addEvent ("HudEinblendenMoney", true ) addEventHandler ("HudEinblendenMoney", getRootElement(), hudEinblendenMoney_func) function hudAusblendenMoney () showPlayerHudComponent ( "money", false ) ausblendentimer_money_started = false end function hudAusblendenDmg () showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "armour", false ) ausblendentimer_dmg_started = false end function hudAusblendenFire () showPlayerHudComponent ( "ammo", false ) hideWeaponFireState () ausblendentimer_fire_started = false end function hudAusblendenSwitch () showPlayerHudComponent ( "weapon", false ) hideWeaponFireState () ausblendentimer_switch_started = false end function showall ( key, state ) if state == "down" and not isPedDead ( lp ) then showPlayerHudComponent ( "ammo", true ) showPlayerHudComponent ( "weapon", true ) showPlayerHudComponent ( "health", true ) showPlayerHudComponent ( "armour", true ) showPlayerHudComponent ( "money", true ) showPlayerHudComponent ( "area_name", true ) showPlayerHudComponent ( "clock", true ) showPlayerHudComponent ( "radar", true ) showWeaponFireState () showHungerBar() refreshAmmoKindDraw () end if state == "up" then showPlayerHudComponent ( "ammo", false ) showPlayerHudComponent ( "weapon", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "area_name", false ) showPlayerHudComponent ( "clock", false ) hideWeaponFireState () hideHungerBar() end end function hideall () showPlayerHudComponent ( "ammo", false ) showPlayerHudComponent ( "weapon", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "money", false ) showPlayerHudComponent ( "area_name", false ) showPlayerHudComponent ( "clock", false ) local inprogress = false end
-
ich wollte die zeit im krankehaus erhöhen damit die medics mehr zeit haben und wollte fragen ob mir einer sagen kann wie das funktioniert
script:
Lua
Alles anzeigenfunction showProgressBar_func ( time ) if gWindow["reviveProgress"] then guiSetVisible ( gWindow["reviveProgress"], true ) else gWindow["reviveProgress"] = guiCreateWindow(screenwidth/2-264/2,screenheight/2-344/2,255,344,"Krankenhaus",false) guiSetAlpha(gWindow["reviveProgress"],1) gImage["death"] = guiCreateStaticImage(0.0758,0.0698,0.803,0.5349,"images/medic.jpg",true,gWindow["reviveProgress"]) guiSetAlpha(gImage["death"],1) gLabel["deathbarText1"] = guiCreateLabel(0.0355,0.6076,0.9356,0.1366,"\nDu bist gestorben und wirst nun im\nKrankenhaus wieder zusammengeflickt.",true,gWindow["reviveProgress"]) guiSetAlpha(gLabel["deathbarText1"],1) guiLabelSetColor(gLabel["deathbarText1"],200,200,000) guiLabelSetVerticalAlign(gLabel["deathbarText1"],"top") guiLabelSetHorizontalAlign(gLabel["deathbarText1"],"left",false) guiSetFont(gLabel["deathbarText1"],"default-bold-small") gProgress["progressDeathtime"] = guiCreateProgressBar(0.1705,0.8285,0.6667,0.1366,true,gWindow["reviveProgress"]) guiSetAlpha(gProgress["progressDeathtime"],1) guiProgressBarSetProgress(gProgress["progressDeathtime"],0) gLabel["deathbarText2"] = guiCreateLabel(0.2727,0.7733,0.5152,0.0523,"Behandlungsfortschritt:",true,gWindow["reviveProgress"]) guiSetAlpha(gLabel["deathbarText2"],1) guiLabelSetColor(gLabel["deathbarText2"],125,125,200) guiLabelSetVerticalAlign(gLabel["deathbarText2"],"top") guiLabelSetHorizontalAlign(gLabel["deathbarText2"],"left",false) guiSetFont(gLabel["deathbarText2"],"default-bold-small") end --setTimer ( updateDeathBar_func, time*10, 100 ) --setTimer ( hideUpdateBar, time*1000, 1 ) end addEvent ( "showProgressBar", true ) addEventHandler ( "showProgressBar", getRootElement(), showProgressBar_func ) function updateDeathBar_func ( new ) local newBarSize = new guiProgressBarSetProgress(gProgress["progressDeathtime"],newBarSize) if newBarSize >= 100 then hideUpdateBar () end end addEvent ( "updateDeathBar", true ) addEventHandler ( "updateDeathBar", getRootElement(), updateDeathBar_func ) function hideUpdateBar () guiSetVisible ( gWindow["reviveProgress"], false ) end
-
1. Vio Extendet
2. Das Fahrzeug kann nicht respawnt werden auch nicht durch das admin panel.
3. beim besitzer steht der käufer -
hallo community ich habe ein problem jedesmal wen ein user ein auto kauft wird es nicht gekauft und ich weis nicht wie man den fehler beheben kann
Error:
LuaERROR: [vio]/vio/carsys/carhouses/carbuy_allround.lua:144: attempt to call global 'prompt' (a nil value)
lua datein:Luaif vioGetElementData ( player, "playingtime" ) <= 0 then local text = "Du hast soeben ein Fahrzeug erworben!\nHier einige kurze Hinweise:\n\n1. Du kannst dein Fahrzeug mit /park an einem neuen\nOrt abstellen - dort wird es nach einem Server-\nrestart oder wenn du /towveh eintippst, erscheinen.\n\n2. Den Motor schaltest du mit \"X\" ein und aus.\n\n3. Mit /lock kannst du dein Fahrzeug abschliessen.\n\n4. Parke dein Fahrzeug nur an angemessenen Stellen,\nsonst wird es moeglicherweise geloescht.\nNicht angemessene Stellen sind z.b. auf der Strasse oder\nan wichtigen Stellen ( z.b. dem Eingang der Stadthalle ).\n\nFuer mehr: /vehinfos" prompt ( player, text, 30 ) end
-
ich habe das so gemacht aber jeder kann es benutzen
-
Lua
function Superman.cmdSuperman() if vioGetElementData ( source, "adminlvl" ) < 3 then local self = Superman if isPedInVehicle(localPlayer) or isPlayerFlying(localPlayer) then return end setElementVelocity(localPlayer, 0, 0, TAKEOFF_VELOCITY) setTimer(Superman.startFlight, TAKEOFF_FLIGHT_DELAY, 1) end end
soll ich das so machen ?
-
hallo community
Luafunction Superman.cmdSuperman() local self = Superman if isPedInVehicle(localPlayer) or isPlayerFlying(localPlayer) then return end setElementVelocity(localPlayer, 0, 0, TAKEOFF_VELOCITY) setTimer(Superman.startFlight, TAKEOFF_FLIGHT_DELAY, 1) end
wie kann ich diesen Code machen das nur ein Admin ihn benutzen kann.
Also das ein admin lvl 3 den befehl nur benutzen kann