SA-MP Forums Archive
[Ajuda] erro - 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] erro (/showthread.php?tid=631419)



erro - didimk157 - 29.03.2017

pawn Код:
stock GetVehicleHealthEx(vehicleid)
{
        new Float:health;
        GetVehicleHealth(vehicleid, health);

        if (health > 900.0)
        {
        return health / 10.0; // tag mismatch
        }
        else return ( health / 10.0 )-(24); // tag mismatch
}



Re: erro - MultiKill - 29.03.2017

PHP код:
FloatGetVehicleHealthEx(vehicleid
@Edit

Se for colocar no final do script coloque o cуdigo abaixo no topo:
PHP код:
forward FloatGetVehicleHealthEx(vehicleid); 



Re: erro - didimk157 - 29.03.2017

Quote:
Originally Posted by MultiKill
Посмотреть сообщение
PHP код:
FloatGetVehicleHealthEx(vehicleid
@Edit

Se for colocar no final do script coloque o cуdigo abaixo no topo:
PHP код:
forward FloatGetVehicleHealthEx(vehicleid); 
como assim ?


Re: erro - ViniBorn - 29.03.2017

Se a linha onde a funзгo foi criada for menor que a linha onde a funзгo й usada, use o primeiro exemplo.
Se nгo for, use o segundo


Re: erro - VinteDois - 29.03.2017

Quote:
Originally Posted by didimk157
Посмотреть сообщение
como assim ?
Assim
Quote:
Код:
stock Float:GetVehicleHealthEx(vehicleid)
{
	new Float:health;
	GetVehicleHealth(vehicleid, health);

	if ( health > 900.0) {
		return health / 10.0;
	}
	else return ( health / 10.0 )-(24);
}
forward Float: GetVehicleHealthEx(vehicleid);



Re: erro - MBJ - 29.03.2017

PHP код:
stock Float:GetVehicleHealthEx(vehicleid)
{
        new 
Float:health;
        
GetVehicleHealth(vehicleidhealth);
        if (
health 900.0)
        {
            return 
health 10.0
        }
        else return ( 
health 10.0 )-(24);