30.01.2019, 10:36
So, something like this?
pawn Код:
CMD:fight(playerid, params[])
{
new wep_id, string[100], gunname[32];
if(sscanf(params, "d", wep_id)) return SCM(playerid, COLOR_GREEN, "* [USAGE]: /fight [weapon id]");
GetWeaponName(wep_id, gunname, sizeof(gunname));
switch (wep_id)
{
case 2 .. 13, 15, 16, 18, 22 .. 39, 41, 42:
{
format(string, sizeof(string), "~g~%s ~w~fight!", gunname);
foreach(new i : Player)
{
GivePlayerWeapon(i, wep_id, 9999);
GameTextForPlayer(i, string, 3000, 4);
}
}
default:
{
SCM(playerid, COLOR_RED, "* Invalid weapon ID.");
}
}
return 1;
}