SA-MP Forums Archive
Help! Anti - DM - 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: Help! Anti - DM (/showthread.php?tid=424654)



Help! Anti - DM - FunnyBear - 23.03.2013

Hello,

How do you stop people from shooting eachother. I mean like, say a cop tries to shoot another cop. He doesn't lose any health! Same with a civilian trying to shoot another civilian.

Help appreciated!

Thanks


Re: Help! Anti - DM - Mystique - 23.03.2013

I guess you can use this function to find out if it's a civilian who shot or a cop.
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage


Re: Help! Anti - DM - davve95 - 23.03.2013

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

And a function that checks what's team they are in.

Sorry if this was wrong or something but I gave it a try.


Re: Help! Anti - DM - [ABK]Antonio - 23.03.2013

SetPlayerTeam


Re: Help! Anti - DM - FunnyBear - 23.03.2013

Quote:
Originally Posted by [ABK]Antonio
Посмотреть сообщение
SetPlayerTeam? This has nothing to do with what I'm asking for, I already have teams...

And, can you guys help me, cos I don't know what to put with OnPlayerTakeDamage


Re: Help! Anti - DM - [ABK]Antonio - 23.03.2013

Quote:
Originally Posted by FunnyBear
Посмотреть сообщение
Hello,

How do you stop people from shooting eachother. I mean like, say a cop tries to shoot another cop. He doesn't lose any health! Same with a civilian trying to shoot another civilian.

Help appreciated!

Thanks
Quote:
Originally Posted by FunnyBear
Посмотреть сообщение
SetPlayerTeam? This has nothing to do with what I'm asking for, I already have teams...

And, can you guys help me, cos I don't know what to put with OnPlayerTakeDamage
It has everything to do with what you're asking for...


Re: Help! Anti - DM - FunnyBear - 23.03.2013

Can someone help?


Re: Help! Anti - DM - Mystique - 23.03.2013

Umm just find out if the issuerid parameter is the ID of the same team and then restore the players health?


Re: Help! Anti - DM - FunnyBear - 23.03.2013

Quote:
Originally Posted by Mystique
Посмотреть сообщение
Umm just find out if the issuerid parameter is the ID of the same team and then restore the players health?
Can you give an example?


Re: Help! Anti - DM - RayW - 23.03.2013

Sigh. Read what Antonio said.