21.03.2009, 00:55
Код:
OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerInAnyVehicle(killerid)) { if(reason == 28 || reason == 29 || reason == 32) { new Float:tmpx, Float:tmpy, Float:tmpz; GetPlayerPos(playerid, tmpx, tmpy, tmpz); SendClientMessage(killerid, 0xff0000ff, "Driveby detected. You have been kicked."); SendClientMessage(playerid, 0x000000ff, "You have been killed by driveby, you will now respawn where you died."); SpawnPlayer(playerid); SetPlayerHealth(playerid, 100); SetPlayerPos(playerid, tmpx, tmpy, tmpz); Kick(killerid); } } return 1; }