18.12.2012, 19:19
------------- UPDATE
Hmm, these lines are wrong, because it will:
1. Give player money (amount you wrote)
2. Check if you have money you have given the player
3. If yes then it decerases your money
4. If no, then it doesnt decerase your money, sends you 'You dont have enough money' msg, but still gives 'myId' the money..
Do it this way:
Should work.. 
Greetz,
LetsOWN
pawn Код:
GivePlayerMoney(myId, amount);
if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, RED, "You do not have enough money");
GivePlayerMoney(playerid, -amount);
1. Give player money (amount you wrote)
2. Check if you have money you have given the player
3. If yes then it decerases your money
4. If no, then it doesnt decerase your money, sends you 'You dont have enough money' msg, but still gives 'myId' the money..

Do it this way:
pawn Код:
if(GetPlayerMoney(playerid) < amount)
{
SendClientMessage(playerid, 0xFF0000FF, "You do not have enough money");
return 1;
}
else
{
GivePlayerMoney(myId, amount);
GivePlayerMoney(playerid, -amount);
}

Greetz,
LetsOWN

