SA-MP Forums Archive
How to check - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to check (/showthread.php?tid=183724)



How to check - ruckfules99 - 16.10.2010

How can I check if a player used a tank (rhino) and killed another player?


If they did, it gives them +1 Score.

I can't think of how to do that?


Re: How to check - Mauzen - 16.10.2010

In OnPlayerDeath:

check if 'killerid' is in a tank
GetVehicleModel(GetPlayerVehicle(killerid)) == 432

if he is, add 1 to his score


Re: How to check - DarrenReeder - 16.10.2010

go to the callback, OnPlayerDeath..

and check if the killerid is in a vehicle...and if the killer is in a rhino...


Re: How to check - ruckfules99 - 16.10.2010

Will this work if I'm in a hunter and i shoot player who is in car will it still work


And what if i use rhino to shoot a player in car will it work


Re: How to check - cmg4life - 16.10.2010

Quote:
Originally Posted by ruckfules99
Посмотреть сообщение
Will this work if I'm in a hunter and i shoot player who is in car will it still work


And what if i use rhino to shoot a player in car will it work
Won't since Sa-Mp doesn't detects the killer as killing a player, it detects the player dying from the car's explosion (which is kinda logical but not practical).