03.08.2009, 15:59
Hello,
I have created simple commands for my server where people can buy their score.
The maximum they can buy at once is 10, so there are 10 commands like this.
I did it like that cause I don't know how to make commands where you can choose a number from 1-10.
So I've just tested and you can buy them and you're money simply goes to minus.
How would I make it so if you don't have enough money, you get a message that you don't have enough money.
Btw, 1 score = 2000, 2 score = 4000, 3 score = 6000
Each has 2000$ more so /buyscore 10 would cost 20.000$
Thanks!
I have created simple commands for my server where people can buy their score.
The maximum they can buy at once is 10, so there are 10 commands like this.
Quote:
if(strcmp(cmdtext, "/buyscore 1", true) == 0) { GivePlayerMoney(playerid, -1000); SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); SendClientMessage(playerid,COLOR_ORANGE,"You just bought 1 score for 1000$"); return 1; } |
So I've just tested and you can buy them and you're money simply goes to minus.
How would I make it so if you don't have enough money, you get a message that you don't have enough money.
Btw, 1 score = 2000, 2 score = 4000, 3 score = 6000
Each has 2000$ more so /buyscore 10 would cost 20.000$
Thanks!