20.06.2010, 20:15
scrolllllllllllllllll downnnnnnn
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][AdminLevel] => 1)
{
//MEssage to admins
}
}
[for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pAdmin] < 5)
{
SentClientMessage();
}
}/code]
i gotta do this in every command >.<?
stock SendCmdToAdmins(playerid,text[])
{
new str[180],Name[24];
GetPlayerName(playerid,Name,24);
format(str,sizeof(str),"(%s has used the command %s)!",Name,text);
for(new d,g=GetMaxPlayers(); d < g; d++)
if(d != playerid && PlayerInfo[d][AdminLevel] >= 1)
SendClientMessage(d,COLOR,str);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
SendCmdToAdmins(playerid,cmdtext);
d != playerid &&
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
if(PlayerInfo[i][pAdmin] < 5)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}
|
Originally Posted by » Titan «
pawn Код:
|
XDDDforward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
{
if(PlayerInfo[i][pAdmin] == 5)
{
SendClientMessage(i, color, string);
}
}
}
return 1;
}