How to stop a Teleport? - 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 stop a Teleport? (
/showthread.php?tid=614155)
How to stop a Teleport? -
danish007 - 05.08.2016
Hello, I've a Deathmatch server, there so many players use teleport commands to Avoid death when they reach at piss health. i just want to know that how can i make a system? that when player is fighting, the teleport command (eg: /drylake) should not work for him/her.
Re: How to stop a Teleport? -
FuNkYTheGreat - 05.08.2016
When player health will less that 20 it will Send him Message "ou Can't Leave The DeathMatch because you have less that 20 Health" and about 70% is taken from Wiki
Код:
CMD:leave(playerid,params[])
{
new Float:health;
GetPlayerHealth(playerid,health);
if (health > 20.0)
{
SendClientMessage(playerid,-1, "You Can't Leave The DeathMatch because you have less that 20 Health");
}
return 1;
}
Re: How to stop a Teleport? -
JuzDoiT - 08.08.2016
danish i sugget onplayertakedamage .. if player take damage ,, cannot teleport it will be more awsome..
Re: How to stop a Teleport? -
Parallex - 08.08.2016
Quote:
Originally Posted by JuzDoiT
danish i sugget onplayertakedamage .. if player take damage ,, cannot teleport it will be more awsome..
|
That will be a flop system. OnPlayerTakeDamage would occur once the player would get shot (shot in this case as it's a deathmatch), and he told to disable teleportation while player is suffering the last few remaining HP, that would not work.