09.07.2010, 10:10
OnPlayerDeath with reason (and Splat):
OnPlayerEnterVehicle with vehicleid
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
if(killerid == INVALID_PLAYER_ID) { reason = "Splat"; }
else { GetWeaponName(reason, weap, sizeof(weap)); }
format(string, sizeof(string),"%s has Died (reason)",playername, reason);
SendClientMessageToAll(0x00FF32FF,string);
return 1;
}
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new string[128];
format(string, sizeof(string), "You have entered a Vehicle (%d)", vehicleid);
SendClientMessage(playerid, COLOR_INTERFACE, string);
return 1;
}