if( sscanf( params, "d(114)" amount ) ) return SendClientMessage( ... );
So what is the command that you want to do this ?
Give us the Code... |
if(strcmp(item, "pot") == 0)
{
new pot = CarInfo[car][vPot];
//if no amount return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get pot [amount]");
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;
}
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;
}
if(strcmp(item, "pot") == 0)
{
new pot = CarInfo[car][vPot];
//if no amount return SendClientMessage(playerid, COLOR_GREY, "* Usuage: /car get pot [amount]");
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;
}