30.01.2019, 08:56
I'm trying to do a /fight command.
Explanation:
Admin can do /fight [weapon id] to give the choose weapon ID to all players and showing them a GameText, but in GameText i wanna show weapon name, like, if admins do /fight 24 it will show: "Deagle fight!", but getting some errors:
Error line is referred to GameText.
GunName:
Explanation:
Admin can do /fight [weapon id] to give the choose weapon ID to all players and showing them a GameText, but in GameText i wanna show weapon name, like, if admins do /fight 24 it will show: "Deagle fight!", but getting some errors:
Quote:
(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 |
pawn Код:
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;
}
pawn Код:
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"
};