zma4.pwn(8659) : warning 203: symbol is never used: "ServerWeapon"
#1


IMAGES

Код HTML:
ServerWeapon(playerid, weaponid, ammo)
{
if(weaponid >= 1 && weaponid <= 15)
 	{
	Weapons[playerid][Melee] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}

		if( weaponid >= 16 && weaponid <= 18 || weaponid == 39 ) // Checking Thrown
 	{
	Weapons[playerid][Thrown] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}
	if( weaponid >= 22 && weaponid <= 24 ) // Checking Pistols
 	{
	Weapons[playerid][Pistols] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}

	if( weaponid >= 25 && weaponid <= 27 ) // Checking Shotguns
 	{
	Weapons[playerid][Shotguns] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}
	if( weaponid == 28 || weaponid == 29 || weaponid == 32 ) // Checking Sub Machine Guns
 	{
	Weapons[playerid][SubMachine] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}

	if( weaponid == 30 || weaponid == 31 ) // Checking Assault
 	{
	Weapons[playerid][Assault] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}

	if( weaponid == 33 || weaponid == 34 ) // Checking Rifles
 	{
	Weapons[playerid][Rifles] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}
	if( weaponid >= 35 && weaponid <= 38 ) // Checking Heavy
 	{
	Weapons[playerid][Heavy] = weaponid;
	GivePlayerWeapon(playerid, weaponid, ammo);
	return 1;
	}
return 1;
}
Please help me
Reply
#2

Use ServerWeapon somewhere :#
Reply
#3

where i place ?
Reply
#4

ServerWeapon=GivePlayerWeapon you must replace it with GivePlayerWeapon
Reply
#5

How ??
Reply
#6

GivePlayerWeapon(playerid,weaponid,ammo);


ServerWeapon(playerid,weaponid,ammo);
Reply
#7

can you help me ? I do not know how to replace her scipt ??
Reply
#8

Press ctrl + h
First: GivePlayerWeapon
2ND: ServerWeapon

And then replace in ServerWeapon to be GivePlayerWeapon cuz it will infinite loop
Reply
#9

Thanks bro , Fixed
Reply
#10

Ofcourse, you'll get this error. You should use this function somewhere (anywhere e.g: OnPlayerConnect (callback) or any where) and the error will be wiped off by itself.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)