Anti Ram Problem - 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: Anti Ram Problem (
/showthread.php?tid=517780)
Anti Ram Problem -
Problems - 06.06.2014
I use this under OnPlayerGiveDamage
pawn Код:
if(weaponid == 49)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(damagedid,x,y,z);
SetPlayerPos(damagedid,x,y,z+2);
format(string,sizeof(string),"ANTI RAM has teleported %s(%d) to the car roof.",PlayerName(damagedid),damagedid);
SendClientMessageToAll(COLOR_ADMIN,string);
GameTextForPlayer(playerid, "~r~Do not Car Park and Ramming!", 1000, 5);
}
But people can ram each others easily
Re: Anti Ram Problem -
nejc001 - 06.06.2014
Hm, the weaponid 49 might not work that way, possibly only when a player dies by that, but not when he recieve damage by a vehicle. (even tho you can hear hitsound when you ram somebody).
Try on OnPlayerTakeDamage.
Re: Anti Ram Problem -
Problems - 06.06.2014
Thanks it works at OnPlayerTakeDamage