How to
#6

If it would be:

pawn Код:
if(GetPlayerMoney(playerid) == 10000)
{
  SetPlayerHealth(playerid, 0);
  SendClientMessage(playerid, 0xFFADSADS, "You can't have more than $10000, but since you had, you died !");
  SendClientMessage(playerid, 0xFFADSADS, "Your money was set to '10000' !");
  SetPlayerMoney(playerid, 10000); //Dunno if you got a function like this..
  return 1;
}
It would kill the player only if he/she would have exactly 10000..


But if you make it

pawn Код:
if(GetPlayerMoney(playerid) > 10000)
{
  SetPlayerHealth(playerid, 0);
  SendClientMessage(playerid, 0xFFADSADS, "You can't have more than $10000, but since you had, you died !");
  SendClientMessage(playerid, 0xFFADSADS, "Your money was set to '10000' !");
  SetPlayerMoney(playerid, 10000); //Dunno if you got a function like this..
  return 1;
}
it kills the player if he got more than 10000. Like 15000, 16000, or 10001...
EDIT: Fixed the fail in the pawn scripts..
Reply


Messages In This Thread
How to - by laser50 - 23.03.2010, 14:16
Re: How to - by Lajko1 - 23.03.2010, 14:21
Re: How to - by laser50 - 23.03.2010, 15:06
Re: How to - by adsy - 23.03.2010, 15:18
Re: How to - by laser50 - 23.03.2010, 15:19
Re: How to - by Jay420 - 23.03.2010, 15:28
Re: How to - by Anwix - 23.03.2010, 15:46
Re: How to - by adsy - 23.03.2010, 17:36
Re: How to - by laser50 - 23.03.2010, 18:21
Re: How to - by laser50 - 23.03.2010, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)