Car Ramming Prevention
#1

Can someone give me an idea on how to accomplish this? I'm looking for a way to prevent car ramming/car parking on my DM server.

I'd like the driver to be slapped out as soon as a player is rammed with the drivers vehicle. I can't seem to get this right.
Reply
#2

Ugh. I don't know quite how to pull that off, but I know how to punish a player if he does a driveby.
If you need that PM me.
Reply
#3

I'm really needing the Anti-Car Ram/Car Park. I've seen videos of TDM servers doing this but....I can't seemt o get it right.
Reply
#4

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) //Remove 'bodypart' if not using 0.3z
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
            if(GetPlayerState(issuerid) == PLAYER_STATE_DRIVER)
            {
                if(weaponid == 49 || weaponid == 50)
                {
                    new Float:x, Float:y, Float:z;
                    GetPlayerPos(issuerid, x, y, z);
                    SetPlayerPos(issuerid, x, y, z + 5); //Slap the carparker
                    GetPlayerPos(playerid, x, y, z);
                    SetPlayerPos(playerid, x, y, z + 3); //Slap the player so they are no longer being carparked
                    SendClientMessage(issuerid, -1, "Carparking/Ramming is forbidden on this server.");
                }
            }
        }
    }
    return 1;
}
There are probably better methods than this and I'm not saying mine is the best alternative, but this code should have some effect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)