Looking for a 'LastVehicleTouched' type of an include
#1

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.
Reply
#2

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..
Reply
#3

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.
Reply
#4

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*.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)