21.06.2014, 21:26
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;
}