-
Posts
5 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Posts posted by misco
-
-
well styled and done gamemode, keep up, ur going in right direction. reminds me the sa-mp's official party server SFTDM years ago. it's a pitty there are no players(at the moment) interested to play this
-
No,
did some quick test getClosestVehicle returned for me typeof(thenearestVehicle) is number and JSON.stringify(thenearestVehicle) is 7682 which i consider to be handle id. When you add some more test code from wiki for example
testob.setTyreBurst(0, false, 1000); testob.setTyreBurst(1, false, 1000); testob.setTyreBurst(4, false, 1000); testob.setTyreBurst(5, false, 1000);
you will see that the closest vehicle has all tires popped but did not explode, because .explode() method does not seem to be working even trying example from wiki
if( commandName === "exptest") { var vehicle = mp.vehicles.new(989294410, localPlayer.position); //Spawns Voltic2 at 'player' position vehicle.explode(); }
car was spawned without explosion in current 0.3.5 release. So stuff with atHandle mentioned earlier is the right way to do this
edit: btw i made it explode using
testob.explodeInCutscene(true);
-
1
-
-
Might be worth trying to use
let vehicleAct = mp.vehicles.atHandle(closestVehicle);
These native functions return object handle id more likely than id in pool, also ive noticed that handle id changes when entity streams out and in.
-
2
-

Help regarding PlayerDamage & hasBeenDamagedBy
in Scripting
Posted
Sup,
i would consider rage mp's PlayerDamage event more like some kind of 'PlayerHealthChange' event. It is emitted when players health decreases. There is an idea to be tested(i am not sure if available functions work) once PlayerDamage triggered
and work with obtained data, then always clear damage data with these:
This is just an idea how you could achieve this, i do not have time to test it in game currently. Good luck