Jump to content

Areion

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Areion

  1. Areion

    [HELP] VIP

    function vip(thePlayer, command,tplayer) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then local VIP = aclGetGroup("VIP") local tplayer = getPlayerFromName(tplayer) if ( tplayer ) and isGuestAccount(getPlayerAccount(tplayer) ~= true then acladd = aclGroupAddObject (VIP, "user."..getAccountName(getPlayerAccount(tplayer)) if (acladd) then givePlayerMoney(tplayer, 1) outputChatBox("test passed.", tplayer, 255, 255, 255, true) else outputChatBox(getPlayerName(tplayer).." is already VIP.", thePlayer, 255, 0, 0, true) end else outputChatBox("Player not online or not logged in.", thePlayer, 255, 0, 0, true) end end end addCommandHandler("setvip", vip) Alright so you have to enter the player's name now not the account name, like a player is called "test" you type /setvip test and the player gets added to the ACL group VIP gets 1$ and an output, if the account has been added already or the player doesnt exist / is not logged in you'll get an error output.
  2. Areion

    [HELP] VIP

    Mr.SFA7 Your script couldnt wok anyway... local account = getAccountName(getPlayerAccount(account)) Makes no sense as 'account' is a string value
  3. Just read this... https://wiki.multitheftauto.com/wiki/En ... rldTexture If you can't fix it with this help by your own, then I will help you...
  4. Areion

    [HELP] VIP

    The script needs admin rights as well edit your acl and add this resource to admin example : Also if you're using it like this /setvip 'Account name' then the code has to be like this : function vip(thePlayer, command,accountname) if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then local VIP = aclGetGroup("VIP") local account = getAccount(accountname) if ( account ) then aclGroupAddObject (VIP, "user."..accountname) if getAccountPlayer(account) then givePlayerMoney(getAccountPlayer(account), 1) end outputChatBox("Account '"..accountname.."' has been successfully added to VIP.", thePlayer, 255, 255, 255, true) end end end addCommandHandler("setvip", vip)
×
×
  • Create New...