13.12.2012, 16:11
You could create variables and do those, just like an Admin system.
I believe it will output like this:
Lordz has left the team server. (Team ID:1 | Team name:EXAMPLE)
pawn Код:
new team1[MAX_PLAYERS];
new team1str[MAX_PLAYERS][128]; //To set the name of the team so it's a str var too. We can use other ways too but this is bit easy.
public OnPlayerSpawn(playerid)
{
team1[playerid] = 1;
team1str[playerid] = "EXAMPLE";
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new Lname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Lname, sizeof(Lname));
new str[128];
format(str, sizeof(str), "%s has left the team server. (Team ID:%d | Team name:%s)", Lname, team1[playerid], team1str[playerid]);
SendClientMessageToAll(0xFF0000, str);
return 1;
}
Lordz has left the team server. (Team ID:1 | Team name:EXAMPLE)