SA-MP Forums Archive
Undefined symbol "GetVehicleModelMass" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Undefined symbol "GetVehicleModelMass" (/showthread.php?tid=618069)



Undefined symbol "GetVehicleModelMass" - quochuy - 30.09.2016

Код:
new AmountOfShakes[ MAX_PLAYERS ];
forward SetPlayerEarthquakeEffect	( playerid, amount_of_shakes );
forward EarthquakeEffects			( playerid, interval, bool:status );
public SetPlayerEarthquakeEffect( playerid, amount_of_shakes ){
	if( amount_of_shakes < AmountOfShakes[ playerid ] )
		return 0;
	AmountOfShakes[ playerid ] = amount_of_shakes;
	new vehicleid = GetPlayerVehicleID( playerid );
	if( vehicleid ){
		if( GetVehicleModelMass( vehicleid, true ) >= 2400.0 || amount_of_shakes <= SMALL_QUAKE+200 ){
			SetVehicleAngularVelocity( vehicleid, 0.09, 0.033, 0.05 );
		} else SetVehicleAngularVelocity( vehicleid, 0.03, 0.03, 0.03 );
	}
	return EarthquakeEffects( playerid, 10, false );
}
public EarthquakeEffects( playerid, interval, bool:status ){
	if( AmountOfShakes[ playerid ] <= 0 )
		return SetPlayerDrunkLevel( playerid, 0 );
	if( !(AmountOfShakes[ playerid ]%5) ){
		new vehicleid = GetPlayerVehicleID( playerid );
		if( GetVehicleModelMass( vehicleid, true ) >= 2400.0 || AmountOfShakes[ playerid ] <= SMALL_QUAKE+200 ){
			SetVehicleAngularVelocity( vehicleid, 0.03, 0.03, 0.03 );
		} else SetVehicleAngularVelocity( vehicleid, 0.015, 0.015, 0.015 );
	}
	if( status ){
	    SetPlayerDrunkLevel( playerid, 3000 );
	} else SetPlayerDrunkLevel( playerid, 50000 );
	AmountOfShakes[ playerid ]--;
	return SetTimerEx( "EarthquakeEffects", interval, false, "iii", playerid, interval, !status );
}
- Error
Код:
C:\Users\ICAFE8\Desktop\Map Editor Textdraw 6\Map Editor Textdraw\filterscripts\th.pwn(155) : error 017: undefined symbol "GetVehicleModelMass"
C:\Users\ICAFE8\Desktop\Map Editor Textdraw 6\Map Editor Textdraw\filterscripts\th.pwn(166) : error 017: undefined symbol "GetVehicleModelMass"



Re: Undefined symbol "GetVehicleModelMass" - Yaa - 30.09.2016

1 - Download this include https://sampforum.blast.hk/showthread.php?tid=438678
2 - add #include <evi> in u includes
3 - recomplie it
4 - Done


Re: Undefined symbol "GetVehicleModelMass" - CannonBolt - 30.09.2016

What are you planning to do with this code? Event?


Re: Undefined symbol "GetVehicleModelMass" - quochuy - 30.09.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
1 - Download this include https://sampforum.blast.hk/showthread.php?tid=438678
2 - add #include <evi> in u includes
3 - recomplie it
4 - Done
- No work .
C:\Users\ICAFE8\Desktop\tess.pwn(14) : error 017: undefined symbol "GetVehicleModelMass"
C:\Users\ICAFE8\Desktop\tess.pwn(25) : error 017: undefined symbol "GetVehicleModelMass"
PHP код:
#include <a_samp>
#include <evi>
        
new AmountOfShakesMAX_PLAYERS ];
        
forward SetPlayerEarthquakeEffect       playeridamount_of_shakes );
        
forward EarthquakeEffects                       playeridintervalbool:status );
public 
SetPlayerEarthquakeEffectplayeridamount_of_shakes ){
        if( 
amount_of_shakes AmountOfShakesplayerid ] )
                return 
0;
        
AmountOfShakesplayerid ] = amount_of_shakes;
        new 
vehicleid GetPlayerVehicleIDplayerid );
        if( 
vehicleid ){
                if( 
GetVehicleModelMassvehicleidtrue ) >= 2400.0 || amount_of_shakes <= SMALL_QUAKE+200 ){
                        
SetVehicleAngularVelocityvehicleid0.090.0330.05 );
                } else 
SetVehicleAngularVelocityvehicleid0.030.030.03 );
        }
        return 
EarthquakeEffectsplayerid10false );
}
public 
EarthquakeEffectsplayeridintervalbool:status ){
        if( 
AmountOfShakesplayerid ] <= )
                return 
SetPlayerDrunkLevelplayerid);
        if( !(
AmountOfShakesplayerid ]%5) ){
                new 
vehicleid GetPlayerVehicleIDplayerid );
                if( 
GetVehicleModelMassvehicleidtrue ) >= 2400.0 || AmountOfShakesplayerid ] <= SMALL_QUAKE+200 ){
                        
SetVehicleAngularVelocityvehicleid0.030.030.03 );
                } else 
SetVehicleAngularVelocityvehicleid0.0150.0150.015 );
        }
        if( 
status ){
            
SetPlayerDrunkLevelplayerid3000 );
        } else 
SetPlayerDrunkLevelplayerid50000 );
        
AmountOfShakesplayerid ]--;
        return 
SetTimerEx"EarthquakeEffects"intervalfalse"iii"playeridinterval, !status );




Re: Undefined symbol "GetVehicleModelMass" - quochuy - 30.09.2016

Quote:
Originally Posted by CannonBolt
Посмотреть сообщение
What are you planning to do with this code? Event?
Yes.
I use the Earthquake Event


Re: Undefined symbol "GetVehicleModelMass" - Yaa - 30.09.2016

Solution Number 2

1 - Download this include https://github.com/karimcambridge/SA...ive/master.zip
2 - add #include <vehiclemodeldata>
3 - recomplie it
4 - Done


Re: Undefined symbol "GetVehicleModelMass" - quochuy - 30.09.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
Solution Number 2

1 - Download this include https://github.com/karimcambridge/SA...ive/master.zip
2 - add #include <vehiclemodeldata>
3 - recomplie it
4 - Done
error 017: undefined symbol "GetVehicleModelMass"
error 017: undefined symbol "GetVehicleModelMass"



Re: Undefined symbol "GetVehicleModelMass" - Yaa - 30.09.2016

Try to change GetVehicleModelMass to modelMass


Re: Undefined symbol "GetVehicleModelMass" - quochuy - 30.09.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
Try to change GetVehicleModelMass to modelMass
error 017: undefined symbol "modelMass"


Re: Undefined symbol "GetVehicleModelMass" - SickAttack - 30.09.2016

Quote:
Originally Posted by quochuy
Посмотреть сообщение
error 017: undefined symbol "GetVehicleModelMass"
error 017: undefined symbol "GetVehicleModelMass"
The function is vehModelMass in that include.