Hey, ich habe letztens aus Langeweile ein paar Fun Commands für das Extented Script geschrieben.
Solange ich alleine auf dem Server war hat alles geklappt.
Aber als einige Freunde mit auf dem Server spielen wollten, haben die Commands , welche eigentlich den lokalen Spieler auswählen sollen, immer irgend einen zufälligen Spieler ausgewählt.
Bitte um Hilfe
Fehler im Debugscript gibt es nicht.
Hier der Code :
Lua
pname = getPlayerName ( player )
function allcommands ()
outputChatBox ( "/derwuisgeil -> Gibt dir eine komplette Gangwarausrüstung", player , 255, 255, 255 )
outputChatBox ( "/chunkyisfett -> Settet dir deine Hungerleiste auf 100%", player , 255, 255, 0 )
outputChatBox ( "/chunkyisschwul -> Settet dir alle Scheine", player , 255, 255, 255 )
outputChatBox ( "/chunkyismegaschwul -> Settet dir 50.000$", player , 255, 255, 0 )
outputChatBox ( "/lolaffehatrasierteeier -> Leben und Schutzweste setten", player , 255, 255, 255 )
outputChatBox ( "/derwusmagicskills -> Bringt dich zurück in deine Base", player , 255, 255, 0 )
outputChatBox ( "/van -> Gibt dir einen Van deiner Fraktion", player , 255, 255, 255 )
outputChatBox ( "/auto -> Gibt dir ein Auto deiner Fraktion", player , 255, 255, 0 )
outputChatBox ( "/bike -> Gibt dir ein Bike deiner Fraktion", player , 255, 255, 255 )
outputChatBox ( "/limo -> Gibt dir eine Limo deiner Fraktion", player , 255, 255, 0 )
outputChatBox ( "/fbreak -> Breakt dein Fahrzeug", player , 255, 255, 255 )
end
addCommandHandler ("showcommands", allcommands)
function gwausrustung ()
outputChatBox ( "Dir wurde eine ganze Gangwarausrüstung gegeben!", player , 0, 125, 0 )
giveWeapon ( player , 24, 5000, true ) -- Deagle
giveWeapon ( player , 29, 5000, false ) -- Mp5
giveWeapon ( player , 31, 5000, false ) -- M4
giveWeapon ( player , 33, 5000, false ) -- Rifle
end
addCommandHandler ("derwuisgeil", gwausrustung)
function hungerVoll ()
vioSetElementData ( player , "hunger", 100 )
outputChatBox ( "Du hast dir deine Hungerleiste gefüllt! jam jam jam", player , 0, 125, 0 )
end
addCommandHandler ("chunkyisfett", hungerVoll)
function alleScheineeeeeeeee ()
vioSetElementData ( player , "carlicense", 1 )
vioSetElementData ( player , "planelicenseb", 1 )
vioSetElementData ( player , "bikelicense", 1 )
vioSetElementData ( player , "planelicensea", 1 )
vioSetElementData ( player , "fishinglicense", 1 )
vioSetElementData ( player , "perso", 1 )
vioSetElementData ( player , "lkwlicense", 1 )
vioSetElementData ( player , "helilicense", 1 )
vioSetElementData ( player , "segellicense", 1 )
vioSetElementData ( player , "motorbootlicense", 1 )
outputChatBox ("Du hast dir alle Scheine gegeben!", player , 0, 125, 0 )
end
addCommandHandler ("chunkyisschwul", alleScheineeeeeeeee)
function gimmemoremoneeeeey ()
vioSetElementData ( player , "money", vioGetElementData ( player , "money" ) + 50000 )
outputChatBox ( "Du hast dir 50.000$ auf die Hand gegeben!", player , 0, 125, 0 )
end
addCommandHandler ("chunkyismegaschwul", gimmemoremoneeeeey)
function lebenundweste ()
setPedArmor ( player , 100 )
setElementHealth ( player , 100 )
outputChatBox ( pname.. " hat sich volles Leben und Weste gesetzt!", getRootElement(), 125, 0, 0 )
end
addCommandHandler ("lolaffehatrasierteeier", lebenundweste)
function backtobase ()
if isTriad (player ) then
setElementDimension ( player , 0 )
setElementInterior ( player , 0 )
setElementPosition ( player , -2177.1000976563, 704.40002441406, 53.900001525879 )
outputChatBox ( ""..pname.." wurde von derWU's Magic Skills zurück in seine Base gebracht!", getRootElement(), 0, 125, 0 )
elseif isAztecas (player ) then
setElementDimension ( player , 0 )
setElementInterior ( player , 0 )
setElementPosition ( player , -786.5, 2414.6000976563, 157.10000610352 )
outputChatBox ( ""..pname.." wurde von derWU's Magic Skills zurück in seine Base gebracht!", getRootElement(), 0, 125, 0 )
end
end
addCommandHandler ("derwusmagicskills", backtobase)
function spawnGWvan ()
local x, y, z = getElementPosition (player )
if isAztecas (player ) then
derVan = createFactionVehicle ( 482, x+5, y, z+1, 0, 0, 0, 7, 1, 1, 1, 1 )
outputChatBox ( "Du hast dir einen Burrito gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , derVan)
elseif isTriad (player ) then
derVan = createFactionVehicle ( 418, x+5, y, z+1, 0, 0, 0, 3, 3, 3, 3, 3 )
outputChatBox ( "Du hast dir einen Moonbeam gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , derVan)
end
end
addCommandHandler ("van", spawnGWvan)
function spawnGWauto ()
local x, y, z = getElementPosition (player )
if isAztecas (player ) then
dasAuto = createFactionVehicle ( 566, x+5, y, z+1, 0, 0, 0, 7, 1, 1, 1, 1 )
outputChatBox ( "Du hast dir einen Tahoma gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dasAuto)
elseif isTriad (player ) then
dasAuto = createFactionVehicle ( 560, x+5, y, z+1, 0, 0, 0, 3, 3, 3, 3, 3 )
outputChatBox ( "Du hast dir einen Sultan gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dasAuto)
end
end
addCommandHandler ("auto", spawnGWauto)
function spawnGWbike ()
local x, y, z = getElementPosition (player )
if isAztecas (player ) then
dasBike = createFactionVehicle ( 468, x+5, y, z+1, 0, 0, 0, 7, 1, 1, 1, 1 )
outputChatBox ( "Du hast dir eine Sanchez gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dasBike)
elseif isTriad (player ) then
dasBike = createFactionVehicle ( 461, x+5, y, z+1, 0, 0, 0, 3, 3, 3, 3, 3 )
outputChatBox ( "Du hast dir eine PCJ-600 gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dasBike)
end
end
addCommandHandler ("bike", spawnGWbike)
function spawnGWlimo ()
local x, y, z = getElementPosition (player )
if isAztecas (player ) then
dieLimo = createFactionVehicle ( 409, x+5, y, z+1, 0, 0, 0, 7, 1, 1, 1, 1 )
outputChatBox ( "Du hast dir eine Stretch gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dieLimo)
elseif isTriad (player ) then
dieLimo = createFactionVehicle ( 409, x+5, y, z+1, 0, 0, 0, 3, 3, 3, 3, 3 )
outputChatBox ( "Du hast dir eine Stretch gegeben.", player , 0, 125, 0 )
warpPedIntoVehicle ( player , dieLimo)
end
end
addCommandHandler ("limo", spawnGWlimo)
function breakcar ()
local thevehickeeeel = getPlayerOccupiedVehicle ( player )
if isElementFrozen ( thevehickeeeel ) == false then
setElementFrozen ( thevehickeeeel, true )
outputChatBox ("Fahrzeug gebreaket!", player , 0, 125, 0 )
else
setElementFrozen ( thevehickeeeel, false )
outputChatBox ("Fahrzeug entbreaket!", player , 0, 125, 0 )
end
end
addCommandHandler ("fbreak", breakcar)
Alles anzeigen