SA-MP Forums Archive
I need help with make.. -in- - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help with make.. -in- (/showthread.php?tid=359403)



I need help with make.. -in- - xRotem - 13.07.2012

Okay i need help with make when admin level 2 do /o its say Junior Adminstartor on color
AdminLevel AdminName Color[In Photoshop]
2 Junior Adminstartor c4ff00
3 General Adminstartor 00ff11
4 Senior Adminstartor ffd861
1337 Head Adminstartor 007bff
1337 Server Manager f7ff00
99998 Co-Executive Adminstartor b52f2f
99999 Executive Adminstartor ff0303

Quote:

else if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128];
format(string, sizeof(string), "(( Administrator %s: %s ))", GetPlayerNameEx(playerid), params);
OOCOff(COLOR_OOC,string);
}




Re: I need help with make.. -in- - JustinAn - 13.07.2012

Here you go:

Add this anywhere in your script.
pawn Код:
stock GetAdminLvlName(playerid)
{
    new str[64];
    if (PlayerInfo[playerid][pAdmin] == 2) str = ("Junior Administrator");
    if (PlayerInfo[playerid][pAdmin] == 3) str = ("General Administrator");
    if (PlayerInfo[playerid][pAdmin] == 1337) str = ("Co-Head Administrator");
    if (PlayerInfo[playerid][pAdmin] == 1338) str = ("Head Administrator");
    if (PlayerInfo[playerid][pAdmin] == 99998) str = ("Co-Executive Administrator");
    if (PlayerInfo[playerid][pAdmin] == 99999) str = ("Executive Administrator");
    return str;
}
Add this in your command section.

pawn Код:
CMD:o(playerid,params[]) // CMD for ooc chat
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new sendername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(isnull(params)) return SendClientMessage(playerid,-1,"USAGE: /(o)oc [text]");
        format(string, sizeof(string), "(( [%s] %s: %s ))", GetAdminLvlName(playerid), sendername, params);
        OOCOff(COLOR_OOC,string);
    }
    else SendClientMessage(playerid, COLOR_GREY, "  You are not authorized to use this command !");
    return 1;
}

CMD:ooc(playerid, params[]) return cmd_o(playerid, params);



Re: I need help with make.. -in- - xRotem - 13.07.2012

Its not working and i say with colors
soo someone can give me what i say? [ Work! ]


Re: I need help with make.. -in- - JustinAn - 13.07.2012

Quote:
Originally Posted by xRotem
Посмотреть сообщение
Its not working and i say with colors
soo someone can give me what i say? [ Work! ]
Well, there is one problem that you can't do, there can't be 2 1337 admins, that won't work.