SA-MP Forums Archive
[Question] Uncontrollable but vulnerable - 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: [Question] Uncontrollable but vulnerable (/showthread.php?tid=332813)



[Question] Uncontrollable but vulnerable - Skribblez - 09.04.2012

How can you make a player take damage whilst frozen? Since TogglePlayerControllable(playerid, false) makes the player invulnerable.


Re: [Question] Uncontrollable but vulnerable - Boooth - 09.04.2012

Can I ask why you need this?


Re: [Question] Uncontrollable but vulnerable - Skribblez - 09.04.2012

It's for a hospital system that I'm making.

Example:
Player A will be confined upon death.
Player B goes to the hospital and finishes him off.

Now may I ask, why did you ask?


Re: [Question] Uncontrollable but vulnerable - Boooth - 09.04.2012

Just for the reason why you would want someone frozen and have them being attacked, Only way I can suggest is having a SetPlayerPos on the global check so every second it would put them back where they were and force an animation or something similar.


Re: [Question] Uncontrollable but vulnerable - Skribblez - 09.04.2012

Well, the player is being treated at the hospital and was critically injured, so there's no chance for him to move. Applying animations would be the best for this, I believe.


Re: [Question] Uncontrollable but vulnerable - Boooth - 09.04.2012

I agree, if your struggle let me know.


Re: [Question] Uncontrollable but vulnerable - Skribblez - 09.04.2012

Used ApplyAnimation(); instead and made the "freeze" parameter to 1.