Question - 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: Question (
/showthread.php?tid=585477)
Question -
anassmaroc - 14.08.2015
How to remplace Money With Credits
Exemple:if i have 3Credits and i want Be Weapon (5 Credit) u Must Have More Credits.
Need Like this One i Don't Know how to make like it
Re: Question -
LetsOWN[PL] - 14.08.2015
Hello.
Just make some variable which will cumulate amout of the credits that player has, for example:
pawn Код:
new CreditAmount[ MAX_PLAYERS ];
Then, manage somehow, how player will get those credits - in anyway You want.
If You want to make some command which needs n credits, then just use the if statement:
pawn Код:
if( CreditAmount[ playerid ] < n ) {
SendClientMessage( playerid, -1, "You need n credits to issue this command!");
return 1;
}
Greetings.
Re : Re: Question -
anassmaroc - 16.08.2015
Quote:
Originally Posted by LetsOWN[PL]
Hello.
Just make some variable which will cumulate amout of the credits that player has, for example:
pawn Код:
new CreditAmount[ MAX_PLAYERS ];
Then, manage somehow, how player will get those credits - in anyway You want.
If You want to make some command which needs n credits, then just use the if statement:
pawn Код:
if( CreditAmount[ playerid ] < n ) { SendClientMessage( playerid, -1, "You need n credits to issue this command!"); return 1; }
Greetings.
|
explain More