09.12.2014, 17:46
Try this maybe
PHP код:
else if(!strcmp(option, "cocaine", true, 1))
{
if(sscanf(params, "s[32]i", option, amount)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /twithdraw cocaine [amount]");
if(PlayerInfo[playerid][pvTcocaine] < amount) return SendClientMessage(playerid, COLOR_GREY, "You don't have that much cocaine in your trunk.");
PlayerInfo[playerid][pvTcocaine] -= amount;
PlayerInfo[playerid][pcocaine] += amount;
format(string, sizeof(string), "* %s opens their trunk and takes %d grams of cocaine from it.", RPN(playerid), amount);
SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
}