20.07.2013, 00:44
Your error was simple.
You are using || (OR), so if your cash is grater than 4000 or lower than 10000, a 0 value will pass this condition because 0 is lower than 10000.
You should use && (AND)
So the cash must be greater than 4000 and lower than 10000, a 0 value will not pass because it's lower than 4000.
You are using || (OR), so if your cash is grater than 4000 or lower than 10000, a 0 value will pass this condition because 0 is lower than 10000.
You should use && (AND)
So the cash must be greater than 4000 and lower than 10000, a 0 value will not pass because it's lower than 4000.
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(GetPlayerMoney(playerid) >= 1 && GetPlayerMoney(playerid) <= 1001)
{
//my code here
}
if(GetPlayerMoney(playerid) > 1001 && GetPlayerMoney(playerid) < 4000)
{
//my code here
}
if(GetPlayerMoney(playerid) > 4000 && GetPlayerMoney(playerid) < 10000)
{
//my code here
}
else return 1;
return 1;
}