ice_brasil Posted May 6, 2013 Share Posted May 6, 2013 create a god mode but added the settlementalpha to let the player invisible,But when I type / god he is invisible only when I type / god again he goes invisible,What do need to edit when typing god again he normal? my client: --Scripts feitos por xXLeandroXx-- --Não remova os créditos-- --Data 03/11/2012-- 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("#ff0000God Mode Off",thePlayer,255,255,255,true) else setElementData(thePlayer,"invincible",true) outputChatBox("#00ff00God Mode On.",thePlayer,255,255,255,true) end end end addCommandHandler("god",togglestaffMode) function toggleInvis ( thePlayer ) if getElementAlpha( thePlayer ) == 0 then setElementAlpha ( thePlayer, 0) else setElementAlpha ( thePlayer, 130 ) end end addCommandHandler ( "god", toggleInvis ) HELP ME Link to comment
iPrestege Posted May 6, 2013 Share Posted May 6, 2013 function toggleInvis ( thePlayer ) if getElementAlpha( thePlayer ) == 0 then setElementAlpha ( thePlayer, 130) else setElementAlpha ( thePlayer, 0 ) end end addCommandHandler ( "god", toggleInvis ) Try . Link to comment
Moderators IIYAMA Posted May 7, 2013 Moderators Share Posted May 7, 2013 He uses client side. You will see your self invisible(with the script under this), but other players won't see it. Use the script of Mr.Pres[T]ege at serverside. -- client, but not synced for all players. addCommandHandler ( "god", function (command )--toggleInvis if getElementAlpha(localPlayer ) == 0 then setElementAlpha ( localPlayer, 130) --not 255? else setElementAlpha ( localPlayer, 0 ) end end) Use this also serverside. 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("#ff0000God Mode Off",thePlayer,255,255,255,true) else setElementData(thePlayer,"invincible",true) outputChatBox("#00ff00God Mode On.",thePlayer,255,255,255,true) end end end addCommandHandler("god",togglestaffMode) 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