27.04.2016, 14:50
I am trying to create a derby gamemode but I have some errors that I can't fix! 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. Any help please? I tried to create something but unluckily doesn't work.
And don't forget the REP!
PHP код:
public OnVehicleDeath(vehicleid, killerid)
{
new pVictim[MAX_PLAYER_NAME];
GetPlayerName(vehicleid,pVictim,sizeof(pVictim));
PlayerPlaySound(killerid, 1149, 0.0, 0.0, 0.0);
DestroyVehicle(vehicleid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(killerid, -1, "{FF6000}[Congratulations]:{FFFFFF} You killed someone!");
GameTextForPlayer(playerid, "~r~ DEAD!",2000, 3);
PlayerPlaySound(killerid, 1149, 0.0, 0.0, 0.0);
return 1;
}