20.08.2014, 20:18
pawn Код:
new amessage[256];
format(amessage, sizeof(amessage), "%s has connected to the server! ID: %d IP: %f", name[playerid], playerid, IP);
SendMessageToAdmins(amessage, COLOR_LIGHTRED);
pawn Код:
stock SendMessageToAdmins(message[], color = COLOR_GOLD)
{
foreach(new i : Player)
{
if(PlayerInfo[i][pAdminlevel] > 0)
{
SendClientMessage(i, color, message);
}
}
}
pawn Код:
format(string, sizeof(string), "%s has respawned all unused faction vehicles.");
SendMessageToSameFaction(string, COLOR_GREY, playerid);
pawn Код:
stock SendMessageToSameFaction(message[], color, playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction])
{
SendClientMessage(i, color, message);
return 1;
}
return 1;
}
pawn Код:
new string[256];
format(string, sizeof(string), "%s %s has respawned all your faction vehicles!", GetAdminRank(playerid), GetNameWithSpace(playerid));
SendMessageToFactionID(factionid, string, COLOR_GREY);
format(string, sizeof(string), "%s %s has respawned all your faction vehicles of Faction ID: %d", GetAdminRank(playerid), GetNameWithSpace(playerid));
SendMessageToAdmins(string, COLOR_GREY);
pawn Код:
stock SendMessageToFactionID(factionid, message[], color)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pFaction] == factionid)
{
SendClientMessage(i, color, message);
}
}
return 1;
}