(2677) : error 012: invalid function call, not a valid address (2677) : warning 215: expression has no effect (2677) : error 001: expected token: ";", but found ")" (2677) : error 029: invalid expression, assumed zero (2677) : fatal error 107: too many error messages on one line |
CMD:fight(playerid, params[])
{
new wep_id, string[100];
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(wep_id));
GameTextForPlayer(i, string, 3000, 4);
}
return 1;
}
new GunName[47][20] =
{
"Fist","Brass Knuckles","Golf Club","Nightstick","Knife","Basebal Bat","Shovel","Pool Cue","Katana","Chainsaw","Double-ended Dildo","Dildo","Vibrator",
"Silver Vibrator","Flowers","Cane","Grenade","Tear Gas","Molotv Cocktail","?","?","?","9mm","Silenced 9mm","Desert Eagle","Shotgun","Sawnoff",
"SPAS-12","Micro-SMG","MP5","Ak-47","M4","Tec9","Country Rifle","Sniper Rifle","RPG","HS-RPG","Flame-Thrower","Minigun","Satchel Charge","Detonator",
"Spray Can","Fire Extinguisher","Camera","Night Goggles","Thermal Goggles","Parachute"
};
format(string, sizeof(string), "~g~%s ~w~fight!", GunName[wep_id]);
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;
}
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 0, 1, 14, 17, 19, 20, 21, 40, 43, 44, 45, 46: return SCM(playerid, COLOR_RED, "* Invalid 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;
}
switch (wep_id)
{
case 2 .. 13, 15, 16, 18, 22 .. 39, 41, 42:
{
// foreach loop
}
default:
{
SCM(playerid, COLOR_RED, "* Invalid weapon ID.");
}
}
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;
}
CMD:fight(playerid, params[])
{
new wep_id;
if (sscanf(params, "d", wep_id)) return SCM(playerid, COLOR_GREEN, "* [USAGE]: /fight [weapon id]");
switch (wep_id)
{
case 2..13, 15, 16, 18, 22..39, 41, 42:
{
new string[32], gunname[19];
GetWeaponName(wep_id, gunname, sizeof(gunname));
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;
}