little help
#1

i have this command but i cant see gun name.can you fix it
Код:
CMD:aweapon(playerid, params[])
{
    new tmp[256], Weaponid, ammo, wname[64], adminname[MAX_PLAYER_NAME];
    if(PlayerInfo[playerid][pAdmin] >=4 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "ii", Weaponid, ammo)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aweapon [Weaponid] [Ammo]");
        if (Weaponid > 47 || Weaponid < 1 ) return SendClientMessage(playerid, COLOR_RED,"You can give weapon id up to 1-47 to all players.");
        GetPlayerName(playerid, adminname, sizeof(adminname));
        for(new i=0; i<MAX_PLAYERS; i++)
        if(IsPlayerConnected(i))
	    {
	        GivePlayerWeapon(i, Weaponid, ammo);
	        GetWeaponName(Weaponid, wname, 64);
	        format(tmp,128,"%s [ID %d] gave %s with %d ammo to all the players!",adminname, playerid, Weaponid, ammo);
	        SendClientMessageToAll(COLOR_BLUE,tmp);
	    }
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"You do not have permission to use this command!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)