Lloyd Logan Posted April 10, 2013 Share Posted April 10, 2013 So, I was wonder how to give something a name? E.G. to explain myself better, vip = yes if vip then code If you know what i mean. How to set something to a player? -Lloyd Link to comment
iPrestege Posted April 10, 2013 Share Posted April 10, 2013 Do You Mean Like That? local isAlpha = false addCommandHandler("Alpha", function ( plr ) if isAlpha then setElementAlpha(plr,0) isAlpha = false else isAlpha = true setElementAlpha(plr,255) end end ) Link to comment
Max+ Posted April 10, 2013 Share Posted April 10, 2013 if you Mean SortCut for Names , like this , serial = getPlayerSerail(source) .. then Yeah it's possible, Link to comment
Lloyd Logan Posted April 11, 2013 Author Share Posted April 11, 2013 Do You Mean Like That? local isAlpha = false addCommandHandler("Alpha", function ( plr ) if isAlpha then setElementAlpha(plr,0) isAlpha = false else isAlpha = true setElementAlpha(plr,255) end end ) Yes, like how would i set a certains players vip to true/yes? ---the players vip vip = yes Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 But how u will check if the player have a vip group or data or or or etc .. Link to comment
Lloyd Logan Posted April 11, 2013 Author Share Posted April 11, 2013 But how u will check if the player have a vip group or data or or or etc .. That is what i mean. If I were to type, /givevip Mr.Prestige how would i switch vip = no to vip = true? What would i do? Link to comment
Max+ Posted April 11, 2013 Share Posted April 11, 2013 local vip = yes local vip = no if vip == no then setElementData(.. , yes ) elseif vip = yes then setElementData(.. , no ) Link to comment
iPrestege Posted April 11, 2013 Share Posted April 11, 2013 You can make something like this : addCommandHandler("givevip", function ( player,cmd,playerd ) local targetPlayer = getPlayerFromName(tostring(playerd)) if not targetPlayer then return outputChatBox("Player Not Found") end if isGuestAccount(getPlayerAccount(targetPlayer)) then return outputChatBox(" * This Player is not registred!",player,255,0,0,true); end local account = getAccountName(getPlayerAccount(targetPlayer)); if not isObjectInACLGroup ("user."..account, aclGetGroup ( "VIP" ) ) then aclGroupAddObject (aclGetGroup("VIP"),"user."..account); outputChatBox("** You Have Been Give| "..getPlayerName(targetPlayer).." | Vip!",player,0,255,0,true); else aclGroupRemoveObject(aclGetGroup("VIP"),"user."..account); outputChatBox("** You Have Been Remove | "..getPlayerName(targetPlayer).." | Vip!",player,255,0,0,true); end end ) 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