Detecting DriveBy
#3

Код:
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;
}
Reply


Messages In This Thread
Detecting DriveBy - by Redirect Left - 20.03.2009, 22:32
Re: Detecting DriveBy - by Rks25 - 20.03.2009, 22:33
Re: Detecting DriveBy - by Kinetic - 21.03.2009, 00:55

Forum Jump:


Users browsing this thread: 2 Guest(s)