if(strcmp("/admins",cmdtext,true,10) == 0)
{
SCM(playerid,-1,"Admins:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i,"Level")>0)
{
new adminslist[128];
format(adminslist,sizeof(adminslist),"%s",SpielerName(i));
SCM(playerid,-1,adminslist);
}
}
}
}
Код HTML:
if(strcmp("/admins",cmdtext,true,10) == 0)
{
SCM(playerid,-1,"Admins:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i,"Level")>0)
{
new adminslist[128];
format(adminslist,sizeof(adminslist),"%s",SpielerName(i));
SCM(playerid,-1,adminslist);
}
}
}
}
|
Error, dude.
(654) : error 017: undefined symbol "SCM" Line 654: SCM(playerid,-1,"Admins:"); |
#Define SCM SendClientMessage
Just do this at the top of your script..
pawn Код:
|
if(strcmp("/admins",cmdtext,true,10) == 0)
{
SendClientMessage(playerid,-1,"Admins:");
new name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i,"Level")>0)
{
new adminslist[128];
format(adminslist,sizeof(adminslist),"%s",GetPlayerName(i,name,sizeof(name)));
SendClientMessage(playerid,-1,adminslist);
}
}
}
}
no no no define only change the SCM to SendClientMessage
Код HTML:
if(strcmp("/admins",cmdtext,true,10) == 0)
{
SCM(playerid,-1,"Admins:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i,"Level")>0)
{
new adminslist[128];
format(adminslist,sizeof(adminslist),"%s",SpielerName(i));
SendClientMessage(playerid,-1,adminslist);
}
}
}
}
|
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "|____ PUT YOU'RE GAMING NAME HERE Online Administration Team ____|"); // Dont Forget To Change THe Name There!
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1339 || PlayerInfo[i][pTester] >= 1)
{
new admtext[64];
if(PlayerInfo[i][pAppearList] == 1)
{
if(PlayerInfo[i][pAdmin] == 1339) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Co-Owner"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Elite Admin"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Server Developer"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Main Administrator"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Senior Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Global Moderator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Moderator"; } // Also YOu Can Edit Here The Names.
else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
else if(PlayerInfo[i][pTester] == 2) { admtext = "Tester"; }
else if(PlayerInfo[i][pTester] == 1) { admtext = "Trial Tester"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s", admtext, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "%s - %s (On Duty)", admtext, sendername);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}