If it is minus, you get a message.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: If it is minus, you get a message.. (
/showthread.php?tid=170562)
If it is minus, you get a message.. -
rbN. - 23.08.2010
Like, I have an transfer command.. If I do /transfer [id] [money], I transfer money from me to the other person. So as example, I want to give 10000 to ID 1, I do /transfer 1 10000. The problem is, when I do as example: /transfer 1 -10000 I get his money. How could I fix it that you can't do minus?
Re: If it is minus, you get a message.. -
mooman - 23.08.2010
if (moneytotransfer<0) {
SendClientMessage(playerid, COLOR_RED, "Don't try to steal other people's money!");
return 1;
}
Re: If it is minus, you get a message.. -
rbN. - 23.08.2010
Quote:
Originally Posted by mooman
if (moneytotransfer<0) {
SendClientMessage(playerid, COLOR_RED, "Don't try to steal other people's money!");
return 1;
}
|
Shit, that was dumb of me lol.. ty :P
Re: If it is minus, you get a message.. -
HB - 23.08.2010
Quote:
Originally Posted by RobinOwnz
Shit, that was dumb of me lol.. ty :P
|
I'd change 0 to 1, so you can't send $0 to another player