pawn Код:
CMD:gw(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
new pID, wID, Ammo, pName[MAX_PLAYER_NAME], GivenName[MAX_PLAYER_NAME];
if(sscanf(params, "rii", pID, wID, Ammo)) return SendClientMessage(playerid, COLOR_RED, "* Usage: /GW < PlayerID > < WeaponID > < Ammo >");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* That user is not online!");
GivePlayerWeapon(pID, wID, Ammo);
new Str[128];
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(pID, GivenName, sizeof(GivenName));
format(Str, sizeof(Str), "Admin %s has given %s weapon id %d with %d rounds of ammo.", pName, GivenName, wID, Ammo);
SendClientMessage(playerid, COLOR_GREEN, Str);
return 1;
}