17.03.2012, 14:31
This is one of the easiest commands to make, seriously.
pawn Код:
CMD:giveweapon(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) // If they are not RCON admin
{
// Then it sends this message
SendClientMessage(playerid,-1,"You are not authorised to use this command.");
return 1;
}
new
weaponid,
targetid,
ammo;
if(sscanf(params,"uii",targetid,weaponid,ammo))
{
// If they typed the command wrong then show them this
SendClientMessage(playerid,-1,"USAGE: /giveweapon [playerid] [weaponid] [ammo]");
return 1;
}
else
{
GivePlayerWeapon(targetid,weaponid,ammo);
return 1;
}
return 1;
}