function alert ()
local skin = getElementModel(localPlayer)
if skin == 1 then
local name = getPlayerName(localPlayer)
local sound = playSound("alert.mp3") -- Play wasted.mp3 from the sounds folder
setSoundVolume(sound, 1) -- Set the sound volume to 50%
outputChatBox("HLR felhivás "..name.." megnyitotta váróját! Lehet jönni ha bármi segítség kell!")
else
outputChatBox("Nincs engedélyed hozzá")
end
end
addCommandHandler("alert", alert, false, false)
function duty ()
setElementModel(localPlayer, 266)
end
addCommandHandler("aduty", duty, false, false)
I did the if statement for the skin , to your "alert" command
And i corrected the aduty command fuction because you was using thePalyer and it does not mean anything
you should use localPlayer because you are using client side