SDPistol : Tazer help
#1

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

You can't detect who is player shooting.
Reply
#3

Well actually I only need 'If the player receives a sdpistol bullet'
Reply
#4

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

Good idea =D
Reply
#6

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

Mhm, from TRP too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)