SDPistol : Tazer help - 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: SDPistol : Tazer help (
/showthread.php?tid=115321)
SDPistol : Tazer help -
chneubeul - 23.12.2009
Hello guys,
I currently own a SA:MP server and one of my player told me an interesting suggestion. You probably know that the normal '/tazer' in the GF's gamemode, but the suggestion he told me is actually, awesome, but I'm not qualified to do it. That's why I'm requesting your help =)
So, you simply type /tazer, and it brings up a SDPistol. When you'll shoot someone, it will freeze him for 15
seconds. When he'll retype /tazer, it will give him back the pistol he had.
This is what I currently have: if ( GetPlayerWeapon (playerid) = 23) -- So, if the player has the SDPistol (id 23)
if (strcmp(cmd, "/tazer", true) = 0) -- It sets tazer[playerid] = 1
I actually block here:
If the player shoots when he has the tazer
If the player receives a SDpistol bullet
If I know both these function
it would be alright.
Thanks
Re: SDPistol : Tazer help -
MadeMan - 23.12.2009
You can't detect who is player shooting.
Re: SDPistol : Tazer help -
chneubeul - 23.12.2009
Well actually I only need 'If the player receives a sdpistol bullet'
Re: SDPistol : Tazer help -
Sergei - 23.12.2009
That's idea from LS:RP. I was also trying to reproduce it sometime ago. Use OnPlayerKeyStateChange to detect that player 1 is pressing fire key and then loop over players which that player to check who has lost so much health as SD makes damage. It can't be perfect, so it will request you to shoot a few times sometimes to actually detect that.
Re: SDPistol : Tazer help -
chneubeul - 23.12.2009
Good idea =D
Re: SDPistol : Tazer help -
woot - 23.12.2009
http://forum.sa-mp.com/index.php?top...1235#msg841235
Modify the include to avoid setting the player health to 0. Instead, apply the animation and freeze him or whatever ..
Re: SDPistol : Tazer help -
anumaz - 23.12.2009
Mhm, from TRP too.