05.07.2009, 16:36
Its not important if the commandtext return 0, 1 or any other value!
The problem you had you checked if the player have 10'000'000 money and if he have less than 1'000'000, also if you have something between 1'000'000 and 10'000'000 money, you wont get any message
That maybe happend because the numbers are unreadable if they arent grouped
You could have used else, with that you wouldnt have had this problem
The problem you had you checked if the player have 10'000'000 money and if he have less than 1'000'000, also if you have something between 1'000'000 and 10'000'000 money, you wont get any message
That maybe happend because the numbers are unreadable if they arent grouped
You could have used else, with that you wouldnt have had this problem
pawn Код:
if (strcmp(cmdtext, "/buyaccess", true) == 0)
{
if (GetPlayerMoney(playerid) >= 10_000_000)
{ //with that is the number better readable, pawn supports this (source: pawn-lang.pdf)
SendClientMessage(playerid, 0x33AA33AA, "You just bought access to weapon store!");
SetPlayerMoney(playerid, gPlayerMoney[playerid] - 10000000);
gGunAccess[playerid] += 1;
}
else SendClientMessage(playerid, 0xAA3333AA, "You have not enough money!");
return true;
}