pawn Код:
public OnPlayerConnect(playerid)
{
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(msg, 128, "%s has join 'Your Server Name'", name);
SendClientMessageToAll(-1, msg);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new msg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(msg, 128, "%s has left 'Your Server Name' (Timedout/Crash)", name);
case 1: format(msg, 128, "%s has left 'Your Server Name' (Left)", name);
case 2: format(msg, 128. "%s has left 'Your Server Name' (Kicked/Banned)", name);
}
SendClientMessageToAll(0xAFAFAFAA,msg);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);
}
return 1;
}