30.10.2013, 17:47
pawn Код:
CMD:giveweapon(playerid, params[])
{
new id,weapon,name[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],string[128],ammo;
if(sscanf(params, "uii",weapon,ammo)) return SendClientMessage(playerid, -1, "* Usage: /giveweapon <playerid> <weaponid> <ammo>.")&&
SendClientMessage(playerid, 0xFFCC00AA, "* Function: Give weapon To Player.");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "* Player is not connected.");
GivePlayerWeapon(id,weapon,ammo);
GetPlayerName(playerid, name,sizeof(name));
GetPlayerName(id,pName,sizeof(pName));
format(string,sizeof(string), "* Admin: %s Gave You Weapon ID %i",name,weapon);
SendClientMessage(id, -1, string);
format(string,sizeof(string), "* You Gave Weapon %i To %s (ID:%d)",weapon,pName,id);
SendClientMessage(playerid, -1, string);
return 1;
}