08.09.2010, 10:17
I all,i use EasyAdministration FS,i've a problem with the /giveweapon command.
When i use /giveweapon playerid weaponid ammo,he say this:
I've tried the command on myself and dont work..no weapon given..
Here is the command.
Thanks
When i use /giveweapon playerid weaponid ammo,he say this:
Код:
You have given the player WEAPONID PLAYERID AMMO
Here is the command.
Код:
dcmd_giveweapon(playerid,params[])
{
if(Player[playerid][admin] < 2){
return SendClientMessage (playerid,COLOR_RED,"You must be a Admin or higher to give weapons");
}
new pID,weapon,ammo;
if(sscanf(params,"udd",pID,weapon,ammo)){
return SendClientMessage(playerid,COLOR_RED,"USAGE: /giveweapon [playerid][weaponID] [ammo]");
}
if(!IsPlayerConnected(pID)){
return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
}
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(pID,name,sizeof(name));
GivePlayerWeapon(pID,weapon,ammo);
format(string,sizeof(string),"You have given the player %s weapon ID:%d with %d ammo",name,weapon,ammo);
format(string2,sizeof(string2),"Admin %s has give you weapon ID:%d with %d ammo",aname,weapon,ammo);
SendClientMessage(playerid,COLOR_GREEN,string);
SendClientMessage(pID,COLOR_GREEN,string2);
return 1;
}


