SA-MP Forums Archive
Looking for a 'LastVehicleTouched' type of an include - 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: Looking for a 'LastVehicleTouched' type of an include (/showthread.php?tid=520138)



Looking for a 'LastVehicleTouched' type of an include - Adityz - 17.06.2014

Howdy!

I'm trying to make Sumo Deathmatch and I want to create it in such a way that if a player slams another player and if the smashed player falls down, the player who smashed him gets one 'sumo score', thus i've been looking for a LastVehicleTouched.inc or something like that which determines and tells us the last vehicleid, the vehicle of a player collapsed with. I've tried searching for something like that on the forum but i couldn't find anything useful and I don't think I'm capable enough to make this type of thing on my own. So if anyone knows such an include or can make one, I'll be extremely pleased with your efforts. So, thanks.


Re: Looking for a 'LastVehicleTouched' type of an include - Rittik - 17.06.2014

I don't exactly know if my logic will work or not, but still you can try.
Firstly, Under OnPlayerUpdate ,get the playerid's range and then if opponent's id enters that range and drops the other player off. Add +1 to his score. For example:

pawn Код:
if(opponent's id enters that range && drops off the player)
 {
    pScore[opponent'
s id]+=1;
 }
You should use :
GetPlayerPos

IsPlayerInRangeOfPoint

for loop

variables and etc..



Re: Looking for a 'LastVehicleTouched' type of an include - Threshold - 18.06.2014

The only thoughts that come to mind are:
https://sampwiki.blast.hk/wiki/OnUnoccupiedVehicleUpdate (This would only work for unoccupied vehicles though)
and
https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate (This would only be called if the vehicle obtains VISUAL damage)

Other than that, there isn't much option for what you're after. Especially since this isn't the 'Script Request' thread.


Re: Looking for a 'LastVehicleTouched' type of an include - Adityz - 24.06.2014

Quote:
Originally Posted by Threshold
Посмотреть сообщение
The only thoughts that come to mind are:
https://sampwiki.blast.hk/wiki/OnUnoccupiedVehicleUpdate (This would only work for unoccupied vehicles though)
and
https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate (This would only be called if the vehicle obtains VISUAL damage)

Other than that, there isn't much option for what you're after. Especially since this isn't the 'Script Request' thread.
I don't think that this'll do the trick.

I'm still looking for something like this. So if someone can help me, *bump*.