SA-MP Forums Archive
/kill bug - 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: /kill bug (/showthread.php?tid=600237)



/kill bug - eikzdej - 05.02.2016

When i use /kill inside a vehicle, my character can still exit the vehicle even it has no health, how can i make if i use /kill or killed inside a vehicle the characters behavior is just like single player? Thanks!


Re: /kill bug - amirm3hdi - 05.02.2016

Код:
if (IsPlayerInAnyVehicles(playerid)
{
  new Float:player_pos[3];
  GetPlayerPos(playerid, player_pos[0], player_pos[1], player_pos[2]);
  SetPlayerPos(playerid, player_pos[0], player_pos[1], player_pos[2]);
}
SetPlayerHealth(playerid, -1);