How to let a freezed player lose HP on shot - 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 let a freezed player lose HP on shot (
/showthread.php?tid=524470)
How to let a freezed player lose HP on shot -
gychem - 06.07.2014
Is it possible to freeze a player and enable that other players can sitll kill that player?
Re: How to let a freezed player lose HP on shot -
nmader - 06.07.2014
Haven't personally tested it, but I'd imagine this MAY work:
https://sampforum.blast.hk/showthread.php?pid=937824#pid937824
Re: How to let a freezed player lose HP on shot -
AndySedeyn - 06.07.2014
pawn Код:
TogglePlayerControllable(playerid, 0);
0 - To disable the player's ability to move.
1 - To enable it.
https://sampwiki.blast.hk/wiki/TogglePlayerControllable
Re: How to let a freezed player lose HP on shot -
gychem - 06.07.2014
I'm going to try this thanks !
Re: How to let a freezed player lose HP on shot -
Flake. - 06.07.2014
Quote:
Originally Posted by nmader
|
EDIT: I miss read the post.
Just use OnPlayerTakeDamage and check if the player is frozen, if so set their health down every shot
Re: How to let a freezed player lose HP on shot -
gychem - 06.07.2014
TogglePlayerControllable(playerid, 0);
^^ Yes I know that this is to freeze them but players don't lose hp when they get shot while freezed
Re: How to let a freezed player lose HP on shot -
nmader - 06.07.2014
Quote:
Originally Posted by (*|Flake|*)
EDIT: I miss read the post.
Just use OnPlayerTakeDamage and check if the player is frozen, if so set their health down every shot
|
This should work. You'd have to figure out the default SA:MP weapon damages values if you haven't made a custom amount, though. I believe (correct me if I'm wrong, please).
Re: How to let a freezed player lose HP on shot -
AndySedeyn - 06.07.2014
Quote:
Originally Posted by gychem
TogglePlayerControllable(playerid, 0);
^^ Yes I know that this is to freeze them but players don't lose hp when they get shot while freezed
|
And I learned something new. Thanks.
Re: How to let a freezed player lose HP on shot -
gychem - 06.07.2014
Oke I will use onplayertakedamage, I hope this will work, I let you guys know, thanks alot!