ConnorKenway17 Posted November 9, 2013 Posted November 9, 2013 Hola tengo un error puse un comando para los staff que hace que se te ponga un skin seas inmortal y se te ponga un skin pero entonces un player que no sea admin lo pone y le sirve y no se que hacer aqui esta el script function togglestaffMode(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "Admin" ) ) ) then if getElementData(thePlayer,"invincible") then setElementData(thePlayer,"invincible",false) outputChatBox("El staff se ha desconectado.",thePlayer,255,255,255) else setElementData(thePlayer,"invincible",true) outputChatBox("El staff se ha conectado.",thePlayer,255,255,255) end end end addCommandHandler("gostaff",togglestaffMode) Server2 function createTeamsOnStart () teamstaff = createTeam ( "STAFF", 255, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function lol ( player, command ) setPlayerTeam ( player, teamstaff ) setPlayerSkin(player, 217) end addCommandHandler ( "gostaff", skin ) client
Tomas Posted December 5, 2013 Posted December 5, 2013 No conozco mucho de script, pero podrías pasarme el resource así?
Renkon Posted December 6, 2013 Posted December 6, 2013 El isObjectInACLGroup debería estar del lado del servidor; y en lugar de usar el mismo commandHandler client-side, podrías proceder a hacer un triggerClientEvent, y consecuentemente, handlearlo para setear lo de invencible o no.
Recommended Posts