07.10.2011, 10:22
pawn Код:
if(strcmp(item, "pot") == 0)
{
new pot = CarInfo[car][vPot];
if( sscanf( item, "i(114)", amount ) ) return amount = 144;
if(amount < 0) return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get pot [amount]");
if(amount > pot) return SendClientMessage(playerid, COLOR_GREY, "* Your car does not have that much Pot !");
CarInfo[car][vPot] -= amount;
format(string, sizeof(string), "* %s takes out something from his vehicle.", PlayerName(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pPot] += amount;
format(string, sizeof(string), "New amount after taking %d pot: %d", amount, CarInfo[car][vPot]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}