SA-MP Forums Archive
/shop command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /shop command (/showthread.php?tid=600862)



/shop command - Axel712 - 14.02.2016

Hello!
I want to make a /shop command where if you have enough premium points you can get things like VIP and Premium

I just have a problem and that is that I don't know how to make the script set the player's VIP level to a certain Ammount

+rep if you help me


Re: /shop command - FreAkeD - 14.02.2016

If you don't know what you're doing, search and download a VIP system or create one yourself.


Re: /shop command - Godly - 14.02.2016

Well considering if u know the basics it wont be hard to make a /shop cmd, but there are a lot of kinds of shop cmds.You want them to apper as a client message or as a dialog?


Re: /shop command - Axel712 - 14.02.2016

Quote:
Originally Posted by Godly
Посмотреть сообщение
Well considering if u know the basics it wont be hard to make a /shop cmd, but there are a lot of kinds of shop cmds.You want them to apper as a client message or as a dialog?
A dialog


Re: /shop command - Godly - 14.02.2016

If you are new to the whole dialog system look it up on wikipedia.
For your cmd you use DIALOG_STYLE_LIST.You can also add a system that checks does player have enoug cash, score..ect for the rank.I apoligize for not giving u the whole command but u figured your learn it better this way

EDITED: You can also use DIALOG_STYLE_TABLIST for such things.


Re: /shop command - Axel712 - 14.02.2016

I understand that and did that, but I have a problem setting the player's VIP to a certain level


Re: /shop command - Godly - 14.02.2016

Quote:
Originally Posted by Axel712
Посмотреть сообщение
I understand that and did that, but I have a problem setting the player's VIP to a certain level
You have a problem setting his level if he buys the VIP in /shop or you cant set his VIP at all?


Re: /shop command - Axel712 - 14.02.2016

Only if he buys it in the /shop.
I would need a stock or something that would allow me to set his VIP level


Re: /shop command - Godly - 14.02.2016

Example: You can use if player has 50 premium points and buys VIP the system automaticly sets him VIP.
But from old experience I had that system, had a lot of bugs and un safe.Wouldnt recommend.


Re: /shop command - Axel712 - 14.02.2016

Here is the stock that i tried to use:
Quote:

stock SetVip(playerid, vlevel)
{
new vlevel;
PlayerInfo[playerid][pVIP] = vlevel;
}