what's wrong with this command?
#1

I all,i use EasyAdministration FS,i've a problem with the /giveweapon command.

When i use /giveweapon playerid weaponid ammo,he say this:

Код:
You have given the player WEAPONID PLAYERID AMMO
I've tried the command on myself and dont work..no weapon given..

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;
}
Thanks
Reply


Messages In This Thread
what's wrong with this command? - by Face9000 - 08.09.2010, 10:17
Re: what's wrong with this command? - by Face9000 - 08.09.2010, 11:53
Re: what's wrong with this command? - by Mike_Peterson - 08.09.2010, 14:01
Re: what's wrong with this command? - by notime - 08.09.2010, 15:26

Forum Jump:


Users browsing this thread: 1 Guest(s)