Respects points for each level - 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: Respects points for each level (
/showthread.php?tid=393877)
Respects points for each level -
VilleValo - 20.11.2012
Hi guys ^^
How can i modify the level from the beggining, i mean when you register, to have level 1.
And for each level, respects points you need.
For example. For level one, you need 8 RP to /buylevel...
Sorry for my english.
Re: Respects points for each level -
[HK]Ryder[AN] - 20.11.2012
show your levels and points variables
Re: Respects points for each level -
VilleValo - 20.11.2012
Where i take them ?
Re: Respects points for each level -
JaKe Elite - 20.11.2012
Quote:
Originally Posted by VilleValo
Where i take them ?
|
You must create a variable first.
Example:
pawn Код:
new YourVariable[MAX_PLAYERS]; //put it at the top of the script (Below the includes)
you've to make
pawn Код:
YourVariable[playerid] = 1; //set's YourVariable to 1.
when player register
then on a command (Example only) do something like this
pawn Код:
CMD:buyit(playerid, params[])
{
if(YourVariable[playerid] <= 8) return SendClientMessage(playerid, -1, "Error: Not enough points to use the command"); //checks if YourVariable is less than 8, If it is return SendClientMessage is called.
return 1;
}
Re: Respects points for each level -
gtakillerIV - 20.11.2012
Make a user system, it's gonna be better.
https://sampforum.blast.hk/showthread.php?tid=273088
And then do what Romel said, but instead of making a new variable just add one in your enum which should be called "pInfo".
Re: Respects points for each level -
VilleValo - 20.11.2012
But, is a on mysql... i don't want to waste time.