Die Frage im Titel
ocmd:giveweapon(playerid,params[])
{
new pID,name[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],message[128],weaponID,ammo;
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(playerid,pName,sizeof(pName));
if(!IsAdmin(playerid,2))return SendClientMessage(playerid,red,"Your admin rank is too low. You need at least rank 2!");
if(sscanf(params,"iii",pID,weaponID,ammo))return SendClientMessage(playerid,red,"Usage: /giveweapon [ID] [WeaponID] [Ammo]");
if(weaponID < 0 || weaponID > 46)return SendClientMessage(playerid,red,"This weapon doesn't exsit!");
GivePlayerWeapon(pID,weaponID,ammo);
format(message,sizeof(message),"%s (%i) gave %s (%i) a weapon!",name,playerid,pName,pID);
SendClientMessageToAll(green,message);
}
Der Code, denn ich zuletzt geschrieben habe.
Gruß Sky