03.06.2012, 11:10
Well when i do /sellfish and put a number under 0 in it sends the money to the person even though it is under 0 how can i fix this
Help is appreciated
Help is appreciated
Help is appreciated
pawn Код:
command(sellfish, playerid, params[])
{
new fish, string[128];
if(sscanf(params, "d", fish))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /sellfish [amount]");
}
else
{
if(Businesses[Player[playerid][InBusiness]][bType] == 1)
{
if(fish >= Player[playerid][CollectedFish])
{
SendClientMessage(playerid, WHITE, "You don't have that many fish.");
}
else
{
new Calculation = fish*6;
Player[playerid][Money] += Calculation;
format(string, sizeof(string), "You have earned $%d for %d fish.", Calculation, fish);
SendClientMessage(playerid, WHITE, string);
Player[playerid][CollectedFish] -= fish;
}
}
}
return 1;
}