I'm need a help in command, please.
#1

Hello, I'm have a command "admins" and it writes me "error"
can someone to do?
I'm need a command 'admins' to see admins online.
my function in admin mod:
GetPVarInt > Level
CMD:admins(playerid,params[])
thanks you..
Reply
#2

Код 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);
        }
    }
}
}
Reply
#3

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
Код 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:");
Reply
#4

SRy SendClientMessage not SCM i have shortcuted this in my script
Reply
#5

Quote:
Originally Posted by Userpwon
Посмотреть сообщение
Error, dude.
(654) : error 017: undefined symbol "SCM"
Line 654: SCM(playerid,-1,"Admins:");
Just do this at the top of your script..

pawn Код:
#Define SCM SendClientMessage
Reply
#6

Quote:
Originally Posted by VladCanarez
Посмотреть сообщение
Just do this at the top of your script..

pawn Код:
#Define SCM SendClientMessage
its not working for me, give me something other please please.
Reply
#7

no no no define only change the SCM to SendClientMessage

Код HTML:
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);
        }
    }
}
}
Reply
#8

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
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);
        }
    }
}
}
Why I write in chat "/admins" Its writes twice name in chat
Reply
#9

Sry the code is a littlebit false edited! (In my Mode it only writes the name one time)
Reply
#10

Well Try To Use THis Its Better

PHP код:
if (strcmp(cmd"/admins"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
SendClientMessage(playeridCOLOR_GREEN"|____ PUT YOU'RE GAMING NAME HERE Online Administration Team ____|"); // Dont Forget To Change THe Name There!
            
for(new 0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
PlayerInfo[i][pAdmin] >= && 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(isendernamesizeof(sendername));
                        if(
PlayerInfo[i][pAdminDuty] == && PlayerInfo[i][pAppearList] == 1)
                        {
                            
format(stringsizeof(string), "%s - %s"admtextsendername);
                            
SendClientMessage(playeridCOLOR_WHITEstring);
                        }
                        else if(
PlayerInfo[i][pAdminDuty] == && PlayerInfo[i][pAppearList] == 1)
                        {
                            
format(stringsizeof(string), "%s - %s (On Duty)"admtextsendername);
                            
SendClientMessage(playeridTEAM_VAGOS_COLORstring);
                        }
                    }
                }
            }
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)