Command help
#3

Ok did in this way:

pawn Код:
CMD:fight(playerid, params[])
{
    new wep_id, string[100];
   
    new gunname[32];
    GetWeaponName(wep_id, gunname, sizeof(gunname));

    if(sscanf(params, "d", wep_id)) return SCM(playerid, COLOR_GREEN, "* [USAGE]: /fight [weapon id]");

    foreach(new i : Player)
    {
        GivePlayerWeapon(i, wep_id, 9999);
        format(string, sizeof(string), "~g~%s ~w~fight!", gunname);
        GameTextForPlayer(i, string, 3000, 4);
    }
    return 1;
}
But the GameText shows only "FIGHT!" and not the weapon name before. Also can you explain more about sanity checks?
Reply


Messages In This Thread
Command help - by SymonClash - 30.01.2019, 08:56
Re: Command help - by Calisthenics - 30.01.2019, 08:59
Re: Command help - by SymonClash - 30.01.2019, 09:05
Re: Command help - by Calisthenics - 30.01.2019, 09:07
Re: Command help - by SymonClash - 30.01.2019, 09:15
Re: Command help - by Calisthenics - 30.01.2019, 09:26
Re: Command help - by SymonClash - 30.01.2019, 10:36
Re: Command help - by Calisthenics - 30.01.2019, 10:49
Re: Command help - by SymonClash - 30.01.2019, 10:58

Forum Jump:


Users browsing this thread: 3 Guest(s)