Can't make the command work.
#3

I think it should be:
pawn Код:
CMD:gw(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");

else
{
new pID, wID, Ammo;

  new otherId;
  new sendername[MAX_PLAYER_NAME];
new gunname[32];
  new string[256];

 

if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* User is offline!");
    {
   
     if(sscanf(params, "rii", otherId, wID, Ammo)) return SendClientMessage(playerid, 0xAFAFAFAA, "Usage: /gw [PlayerID/PartOfName] [Weapon ID] [Ammo/Quantity]");

GetWeaponName(pID,gunname,sizeof(gunname));
format(string, sizeof(string), "* You have successfully given %s Weapon ID: %s Ammo/Quantity: %d.",sendername, gunname, Ammo);
  SendClientMessage(playerid, COLOR_LIGHTRED, string);
   
 
    GivePlayerWeapon(otherId, weaponID, Ammo);

GetWeaponName(pID,gunname,sizeof(gunname));
GetPlayerName(playerid, sendername, sizeof(sendername)); // This is for admin name
format(string, sizeof(string), "* You have been given a %s ID:%d Ammo/Quantity: %d by Admin %s  ",gunname,  weaponID, Ammo, sendername );
SendClientMessage(otherId, 0xFF4646FF, string);

}

        }
    return 1;
}
I'm not sure about it.
Reply


Messages In This Thread
Can't make the command work. - by Scriptissue - 02.10.2010, 18:57
Re: Can't make the command work. - by [L3th4l] - 02.10.2010, 19:07
Re: Can't make the command work. - by New_Player[USW] - 02.10.2010, 19:09
Re: Can't make the command work. - by Scriptissue - 02.10.2010, 19:15
Re: Can't make the command work. - by [L3th4l] - 02.10.2010, 19:18
Re: Can't make the command work. - by Scriptissue - 02.10.2010, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)