____________Admins____________ AdminRank Admin_Name ______________________________
AdminRank Admin_Name AdminRank Admin_Name AdminRank Admin_Name AdminRank Admin_Name AdminRank Admin_Name ______________________________
if(strcmp( cmd, "/admins", true ) == 0)
{
SendClientMessage( playerid, COLOR_GREEN, "_______________Admins_______________" );
for( new targetid=0; targetid<MAX_PLAYERS; targetid++ )
{
if( IsPlayerConnected(targetid) && PlayerInfo[targetid][pAdmin] >0 )
{
if( PlayerInfo[targetid][pAdmin] == 1 ){ format( string, sizeof(string), "* %s %s: (ID:%d)", AdminRank1, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 2 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank2, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 3 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank3, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 4 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank4, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 5 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank5, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 6 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank6, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 7 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank7, GetPlayerNameEx(targetid), targetid ); }
else if( PlayerInfo[targetid][pAdmin] == 1337 ){ format( string, sizeof( string ), "* %s %s: (ID:%d)", AdminRank8, GetPlayerNameEx(targetid), targetid ); }
SendClientMessage( playerid, COLOR_GRAD1, string );
}
}
SendClientMessage( playerid, COLOR_GREEN, "_____________________________________" );
return 1;
}
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(playerid, COLOR_GREEN, "_______________Admins_______________");
SendClientMessage(playerid, COLOR_GRAD1, " ");
if(PlayerInfo[i][pAdmin] == 1){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank1, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 2){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank2, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 3){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank3, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 4){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank4, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 5){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank5, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 6){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank6, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 7){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank7, GetPlayerNameEx(i)); }
else if(PlayerInfo[i][pAdmin] == 1337){ format(string, sizeof(string), "(%d) %s %s", i, AdminRank8, GetPlayerNameEx(i)); }
SendClientMessage(playerid, COLOR_GRAD1, string);
SendClientMessage(playerid, COLOR_GRAD1, " ");
SendClientMessage(playerid, COLOR_GREEN, "_____________________________________");
return 1;
}
else if(!IsPlayerConnected(i)){ SendClientMessage(playerid, COLOR_GRAD1, "Unfortunatly there are no admins online"); return 1; }
}
}
return 1;
}
#define AdminRank[1] "Server Moderator"
#define AdminRank[2] "Roleplay Administrator"
#define AdminRank[3] "Game Administrator"
#define AdminRank[4] "Senior Game Admin"
#define AdminRank[5] "RP/Forum Supervisor"
#define AdminRank[6] "Admin Supervisor"
#define AdminRank[7] "Server Supervisor"
#define AdminRank[8] "Server Owner"
if(strcmp(cmd, "/admins", true) == 0)
{
new adminsOnline;
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "_______________Admins_______________");
SendClientMessage(playerid, COLOR_GRAD1, " ");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin != 0)
{
format(string, sizeof(string), "(%d) %s %s", i, AdminRank[PlayerInfo[i][pAdmin]], GetPlayerNameEx(i));
SendClientMessage(playerid, COLOR_GRAD1, string);
adminsOnline++;
}
return 1;
}
}
if(adminsOnline == 0)
{
SendClientMessage(playerid, COLOR_GRAD1,"Unfortunatly there are no admins online");
}
SendClientMessage(playerid, COLOR_GRAD1, " ");
SendClientMessage(playerid, COLOR_GREEN, "_____________________________________");
}
return 1;
}
C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(83) : warning 201: redefinition of constant/macro (symbol "AdminRank[2]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(84) : warning 201: redefinition of constant/macro (symbol "AdminRank[3]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(85) : warning 201: redefinition of constant/macro (symbol "AdminRank[4]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(86) : warning 201: redefinition of constant/macro (symbol "AdminRank[5]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(87) : warning 201: redefinition of constant/macro (symbol "AdminRank[6]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(88) : warning 201: redefinition of constant/macro (symbol "AdminRank[7]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(89) : warning 201: redefinition of constant/macro (symbol "AdminRank[1337]") C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(10806) : error 017: undefined symbol "AdminRank" C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(10806) : warning 215: expression has no effect C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(10806) : error 001: expected token: ";", but found "]" C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(10806) : error 029: invalid expression, assumed zero C:\Documents and Settings\User\Desktop\SAMP GameMode\gamemodes\GM.pwn(10806) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
format(string, sizeof(string), "[ID:%d] %s %s", i, AdminRank[PlayerInfo[i][pAdmin]], GetPlayerNameEx(i));
if(!strcmp(cmd,"/admins",true))
{ // forgot to add something
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)&&PlayerInfo[i][pAdmin])
{
switch(PlayerInfo[i][pAdmin])
{
case 1: format(string,sizeof(string),"Server Moderator");
case 2: format(string,sizeof(string),"Roleplay Administrator");
case 3: format(string,sizeof(string),"Game Administrator");
case 4: format(string,sizeof(string),"Senior Game Admin");
case 5: format(string,sizeof(string),"RP/Forum Supervisor");
case 6: format(string,sizeof(string),"Admin Supervisor");
case 1337: format(string,sizeof(string),"Server Supervisor");
case 1338: format(string,sizeof(string),"Server Owner");
default: format(string,sizeof(string),"Server Moderator");
}
format(string,sizeof(string),"%s %s(ID:%d)",string,name(i),i); // just change name to what ever you use as name variable.
SendClientMessage(playerid,COLOR_GREY,string);
}
}
return 1;
}
Originally Posted by MenaceX^
pawn Код:
GetPlayerNameEx = my name function to remove _ between names? |