27.04.2016, 16:59
Quote:
@BloodyRP
I want when I kill someone with drive-by. And exploding his car not killing him. |
Quote:
I want if a player kills another player and both are in a vehicle the killer will hear some sound and will recieve a client message
|
PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(killerid != INVALID_PLAYER_ID)
{
if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
{
SendClientMessage(killerid, -1, "{FF6000}[Congratulations]:{FFFFFF} You killed someone!");
GameTextForPlayer(playerid, "~r~ DEAD!",2000, 3);
PlayerPlaySound(killerid, 1149, 0.0, 0.0, 0.0);
if(IsPlayerInAnyVehicle(playerid)) DestroyVehicle(GetPlayerVehicleID(playerid));
}
}
return true;
}