SA-MP Forums Archive
How to script an Assists system ? - 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: How to script an Assists system ? (/showthread.php?tid=619128)



How to script an Assists system ? - NeXoR - 14.10.2016

Hey guys, I am working on a TDM mode, do you have a suggestion on how to build an Assist system ?
I mean, how can I detect if someone actually "assisted" on killing someone ?


Re: How to script an Assists system ? - TheDrx - 14.10.2016

You may like to look out for OnPlayerWeaponShot and OnPlayerGetHit / OnPlayerHit.


Re: How to script an Assists system ? - Owen007 - 14.10.2016

u mean u like in iG los santos apocalypse?

Script an assisst system at your own this section is for help not for creating an whole script for u. First create at your own then if u get errors show your code here.


Re: How to script an Assists system ? - NeXoR - 14.10.2016

Quote:
Originally Posted by Owen007
Посмотреть сообщение
u mean u like in iG los santos apocalypse?

Script an assisst system at your own this section is for help not for creating an whole script for u. First create at your own then if u get errors show your code here.
You probably can't understand English, I am looking for Suggestions, I don't want people to script for me.

Quote:
Originally Posted by TheDrx
Посмотреть сообщение
You may like to look out for OnPlayerWeaponShot and OnPlayerGetHit / OnPlayerHit.
Thanks!


Re: How to script an Assists system ? - TheDrx - 14.10.2016

You also may try to get the attackers and set the killer as the most damanging attacker.
Look out for https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor


Re: How to script an Assists system ? - NeXoR - 14.10.2016

Quote:
Originally Posted by TheDrx
Посмотреть сообщение
You also may try to get the attackers and set the killer as the most damanging attacker.
Look out for https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor
You mean this ?
https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot

And like the one who gave the most damage won ?


Re: How to script an Assists system ? - TheDrx - 14.10.2016

Yes, you may also use OnPlayerWeaponShot, but you may look out for the range and the update time.