SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/04/2012, 06:05 PM   #1
Allu
Big Clucker
 
Join Date: Feb 2009
Posts: 54
Reputation: 0
Default Problem with a command

pawn Code:
if (strcmp(cmd, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_GREEN, "| Admins Online: |");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1337)
                    {
                        if(PlayerInfo[i][pAdmin] == 1337) { tekst = "{13C6E9}Omanik"; }
                        else if(PlayerInfo[i][pAdmin] == 3) { tekst = "{369BAF}Administraator"; }
                        else if(PlayerInfo[i][pAdmin] == 2) { tekst = "{3A8A9A}Moderaator"; }
                        else if(PlayerInfo[i][pAdmin] == 1) { tekst = "{2AC72D}Abistaja"; }
                    }
                    GetPlayerName(i, sendername, sizeof(sendername));
                    if(PlayerInfo[i][pDuty] == 0)
                    {
                        format(string, sizeof(string), "%s: {FFFFFF}%s", tekst, sendername);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                    }
                    else if(PlayerInfo[i][pDuty] == 1)
                    {
                        format(string, sizeof(string), "%s: {FFFFFF}%s {33AA33}- Tööl", tekst, sendername);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                    }
                }
            }
        }
        return 1;
    }

So my problem here is when I'm typing the command in game then it shows all the players in the server and shows them as Omanik=Owners(a.k.a level 1337 admin). And yes, all the players with admin level 0-s. I can't figure out here what I'm doing wrong.

Last edited by Allu; 11/04/2012 at 01:01 PM.
Allu is offline   Reply With Quote
Old 11/04/2012, 01:01 PM   #2
Allu
Big Clucker
 
Join Date: Feb 2009
Posts: 54
Reputation: 0
Default Re: Problem with a command

I'm still in trouble
Allu is offline   Reply With Quote
Old 14/04/2012, 09:44 AM   #3
Allu
Big Clucker
 
Join Date: Feb 2009
Posts: 54
Reputation: 0
Default Re: Problem with a command

Bump...
Allu is offline   Reply With Quote
Old 16/04/2012, 05:47 PM   #4
Allu
Big Clucker
 
Join Date: Feb 2009
Posts: 54
Reputation: 0
Default Re: Problem with a command

bump
Allu is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command problem Tanush123 Scripting Help 6 11/02/2012 11:09 PM
Command problem(gate command) pliptm Help Archive 0 01/06/2011 05:35 PM
command problem jaksimaksi Help Archive 1 12/08/2010 09:27 AM
problem with a command Padarom Help Archive 2 06/04/2010 02:03 PM


All times are GMT. The time now is 04:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.