05.03.2011, 19:31
Rock's Coin System
Introduction :This is a coin system , like second money.
Commands :
This filescript includes this commands
- /givecoins - players can transfer coins to others
- /coins - see other player coins
- /mycoins - see how much coins you have
- /setcoins - RCON Admin only , set's a player amount of coins .
This is an example of new commands using coins
Code:
CMD:hacked(playerid,params[]) { pInfo[playerid][Coins] -= 100; SendClientMessage(playerid,0xFFFFFFAA,"HaHaHa !!! You have been hacked ! 100 Coins are taken from you ."); return 1; }
Code:
pInfo[playerid][Coins] -= 100;
And this is another example
Code:
CMD:hacker(playerid,params[]) { pInfo[playerid][Coins] += 100; SendClientMessage(playerid,0xFFFFFFAA,"You Hacked somebody ! You get 100 Coins ."); return 1; }
Code:
pInfo[playerid][Coins] += 100;
The differences between this 2 functions are "+" and "-"
see here
Code:
pInfo[playerid][Coins] -= 100; pInfo[playerid][Coins] += 100;