How to let a freezed player lose HP on shot
#1

Is it possible to freeze a player and enable that other players can sitll kill that player?
Reply
#2

Haven't personally tested it, but I'd imagine this MAY work: https://sampforum.blast.hk/showthread.php?pid=937824#pid937824
Reply
#3

pawn Код:
TogglePlayerControllable(playerid, 0);
0 - To disable the player's ability to move.
1 - To enable it.

https://sampwiki.blast.hk/wiki/TogglePlayerControllable
Reply
#4

I'm going to try this thanks !
Reply
#5

Quote:
Originally Posted by nmader
Посмотреть сообщение
Haven't personally tested it, but I'd imagine this MAY work: https://sampforum.blast.hk/showthread.php?pid=937824#pid937824
EDIT: I miss read the post.

Just use OnPlayerTakeDamage and check if the player is frozen, if so set their health down every shot
Reply
#6

TogglePlayerControllable(playerid, 0);
^^ Yes I know that this is to freeze them but players don't lose hp when they get shot while freezed
Reply
#7

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

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

Oke I will use onplayertakedamage, I hope this will work, I let you guys know, thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)