[Ajuda] WARNING GM - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] WARNING GM (
/showthread.php?tid=586987)
WARNING GM -
JuniorTheDM - 27.08.2015
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(hittype == 2)
{
new Float:amount;
switch(weaponid)
{
case 24:amount = 26.0; //Eagle
case 25:amount = 18.0; //Shotgun
case 27:amount = 15.0; //Combat Shotgun
case 29:amount = 5.0; //MP5
case 30:amount = 7.0; //AK-47
case 31:amount = 7.0; //M4
case 42:amount = 0.0; //Extintor - Bombeiros
case 9:amount = 0.0; //Serra - Bombeiros
}
}
return 1;
}
PHP код:
C:\Users\Usuario\Desktop\Brasil Mega City - RPG\gamemodes\RPG.pwn(85782) : warning 204: symbol is assigned a value that is never used: "amount"
Re: WARNING GM -
SepZ - 27.08.2015
ta dizendo que o new "amount" nunca foi usado, foi criado e nгo usado pra nada.
Re: WARNING GM -
pWesley - 27.08.2015
Sу uma coisa: pra setar o dano da arma, se usa a callback OnPlayerGiveDamage, e lб jб vem o Float amount.