Dudalus Posted March 14, 2011 Share Posted March 14, 2011 (edited) Hello Sorry for my english, I`m from Switzerland. Ok, my problem ist, that this command doesnt react. I can fill in /makeleader but I dont see anything (I cant see the else Code). The script is loaded serverside, is this my mistake ? Heres the code: function makeleader(thePlayer, command, tempPlayer, frakid) local invPlayer = getPlayerFromName(tempPlayer) local adminPlayer = getElementData(thePlayer, "AdminLevel") if (tempPlayer) and (frakid) then if tonumber(adminPlayer) == 3 then if (tonumber(frakid) > 0) and (tonumber(frakid) <= 12) then outputChatBox("Du hast den Spieler erfolgreich zum Leader gemacht", thePlayer, 0,255,0) outputChatBox("Du wurdest erfolgreich zum Leader gemacht", tempPlayer, 0,255,0) setElementData(tempPlayer, "Fraktion", tonumber(frakid() setElementData(tempPlayer, "Rank", 5) else outputChatBox("Die Fraktion muss zwischen 0 und 12 liegen", thePlayer,255,0,0) end else outputChatBox("Du bist kein Admin Level 3", thePlayer,255,0,0) end else outputChatBox("Ungültige Eingaben", thePlayer, 255,0,0) end end addCommandHandler("makeleader", makeleader) Edited March 14, 2011 by Guest Link to comment
Dre-+- Posted March 14, 2011 Share Posted March 14, 2011 function makeleader(thePlayer, command, tempPlayer, frakid) local invPlayer = getPlayerFromName(tempPlayer) local adminPlayer = getElementData(thePlayer, "AdminLevel") if (tempPlayer) and (frakid) then if tonumber(adminPlayer) == 3 then if (tonumber(frakid) > 0) and (tonumber(frakid) <= 12) then outputChatBox("Du hast den Spieler erfolgreich zum Leader gemacht", thePlayer, 0,255,0) outputChatBox("Du wurdest erfolgreich zum Leader gemacht", tempPlayer, 0,255,0) setElementData(tempPlayer, "Fraktion", tonumber(frakid)) setElementData(tempPlayer, "Rank", 5) else outputChatBox("Die Fraktion muss zwischen 0 und 12 liegen", thePlayer,255,0,0) end else outputChatBox("Du bist kein Admin Level 3", thePlayer,255,0,0) end else outputChatBox("Ungultige Eingaben", thePlayer, 255,0,0) end end addCommandHandler("makeleader", makeleader) Link to comment
Moderators Citizen Posted March 14, 2011 Moderators Share Posted March 14, 2011 Dre modified this line if you can't see the problem ( line 9 ): setElementData(tempPlayer, "Fraktion", tonumber(frakid( ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now