04.12.2009, 02:16
pawn Код:
dcmd_storedrugs(playerid, params[])
{
new
amount;
if (sscanf(params, "d", amount)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /storedrugs [amount]");
else if (amount > PlayerInfo[playerid][pDrugs]) SendClientMessage(playerid, 0xFF0000AA, "Insufficient Drugs");
else if (!IsPlayerInRangeOfPoint(playerid, 1.0, 1385.0627, -1893.2686, 13.4765)) return SendClientMessage(playerid,0xFF0000AA, "You are not near the drugstore");
else
{
new string[200];
PlayerInfo[playerid][pDrugs] -= amount;
PlayerInfo[playerid][pBag] += amount;
SendClientMessage(playerid, 0x00FF00AA, "Drugs Stored.");
format(string, sizeof(string), " %d Drugs in warehouse ", PlayerInfo[playerid][pBag]);
SendClientMessage(playerid, COLOR_YELLOW, string);
SendClientMessage(playerid, 0x00FF00AA, "/takedrugs to remove them.");
SendClientMessage(playerid, 0x00FF00AA, "/checkdrugs to check amount.");
}
return 1;
}