Hey Leute und zwar kann der Polizist nicht in den dienst gehen kann mir da jemand helfen?
Lua
function duty(theCop, command)
local theCop = gettheCopount(theCop)
if getElementData(theCop, "Fraktion") == 1 then
if isElementWithinMarker(theCop,dutymarker) then
if getElementData(theCop, "Rank") == 0 then
setPedSkin(theCop, 284)
takeAllWeapons ( theCop )
giveWeapon(theCop, 22, 127, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 1 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 280)
giveWeapon(theCop, 22, 127, false)
giveWeapon(theCop, 25, 60, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 2 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 281)
giveWeapon(theCop, 22, 127, false)
giveWeapon(theCop, 25, 60, true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 3 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 282)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 4 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 283)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,false)
giveWeapon(theCop, 29, 127,true)
setElementData(theCop,"Duty",1)
elseif getElementData(theCop, "Rank") == 5 then
takeAllWeapons ( theCop )
setPedSkin(theCop, 288)
giveWeapon(theCop, 24, 127,false)
giveWeapon(theCop, 25, 60,false)
giveWeapon(theCop, 29, 127,true)
setElementData(theCop,"Duty",1)
end
outputChatBox("Du bist nun im Dienst!", theCop)
else
outputChatBox("Du bist nicht am richtigen Ort!", theCop)
end
else
outputChatBox("Du bist kein Beamter !")
end
end
addCommandHandler("duty", duty)
Alles anzeigen