23.04.2018, 11:50
PHP код:
public OnPlayerConnect(playerid)
{
new name[24], str[45];
if(p_info[playerid][admin] > 0) //check if player admin
{
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "admin %s level %d", name, p_info[playerid][admin]);
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++) //loop
{
if(i == playerid || p_info[i][admin] < 1) continue; //if player the player is the one who connected or not admin we skip
SendClientMessage(i, -1, str); //send msg to all admins except the one who joined thats y we skip.
}
}
return 1;
}