Anti Ram Problem
#1

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
Reply
#2

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

Thanks it works at OnPlayerTakeDamage
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)