vGrosho Posted October 26, 2017 Share Posted October 26, 2017 I'm really new at scripting, i may wanted to know how to create a vip system like: check time remaining, command to add vip to a player by his name and to remove Link to comment
Unknown-Guy Posted October 26, 2017 Share Posted October 26, 2017 addCommandHandler("addvip", function (thePlayer, cmd) local account = getPlayerAccount(thePlayer) local accountName = getAccountName(account) if not player then outputChatBox("The player has left, or you have spelled his name wrong",source,255,0,0) return end if isPlayerVIP(getAccountName(getPlayerAccount(player))) then outputChatBox("This player is already VIP, source", 255,0,0) return end if addVIPToDatabase(getAccountName(getPlayerAccount(player)) then setElementData(player,"VIP","Yes") end end) Something like this to create VIP system. Link to comment
WorthlessCynomys Posted October 26, 2017 Share Posted October 26, 2017 Hey. I don't think that if you're new at mta scripting, you should not start with a VIP system. But i would use functions like: setElementData() getRealTime() With these you can set the VIP level of the player in an easily reachable way. Also you have to store the expiration data in internaldb, in an SQL, or in a text file (i do not recommend this). you can check with "if CONDITION then CODE end" if the player has an expired VIP. for the command: addCommandHandler() getPlayerFromName() 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