SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 24/01/2015, 09:20 PM   #1
Ghost110
Little Clucker
 
Join Date: Jan 2015
Location: Behind You...
Posts: 39
Reputation: 0
Default [Help] /o [/ooc] cmd

I have a problem... my players cant use /o . When i disable it, they can't use it, and when i enable it again, they can't use it too... I dont know what is wrong

pawn Code:
CMD:o(playerid, params[])
{
    if(gPlayerLogged{playerid} == 0)
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You're not logged in.");
        return 1;
    }
    if ((noooc) && (PlayerInfo[playerid][pAdmin] < 2 && EventKernel[EventCreator] != playerid && !OOCPower[playerid] && PlayerInfo[playerid][pHelper] < 4))
    {
        SendClientMessageEx(playerid, COLOR_RED, "   The OOC Global Channel has been disabled by Good Life Roleplay Staff");
        return 1;
    }
    if(gOoc[playerid])
    {
        SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "   You have disabled OOC Chat, re-enable with /togooc!");
        return 1;
    }
    if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/o)oc [ooc chat]");

    if(PlayerInfo[playerid][pAdmin] == 1)
    {
        new string[128];
        format(string, sizeof(string), "(( SM1 %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}JA{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}GA{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 4)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}S{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1337)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}SM{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}OM{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 99998)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}SA{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 99999)
    {
        new string[128];
        format(string, sizeof(string), "(( {008000}SD{FFFFFF} %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
    }
    else if(PlayerInfo[playerid][pHelper] == 2)
    {
        new string[128];
        format(string, sizeof(string), "(( H2 %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
        return 1;
    }
    else if(PlayerInfo[playerid][pHelper] == 3)
    {
        new string[128];
        format(string, sizeof(string), "(( H3 %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
        return 1;
    }
    else if(PlayerInfo[playerid][pHelper] == 4)
    {
        new string[128];
        format(string, sizeof(string), "(( H4 %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
        return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] <= 2)
    {
        new string[128];
        format(string, sizeof(string), "(( %s: %s ))", GetPlayerNameEx(playerid), params);
        OOCOff(COLOR_OOC,string);
        return 1;
    }
    return 1;
}


Sorry my bad english
Ghost110 is offline   Reply With Quote
Old 24/01/2015, 09:58 PM   #2
Ghost110
Little Clucker
 
Join Date: Jan 2015
Location: Behind You...
Posts: 39
Reputation: 0
Default Re: [Help] /o [/ooc] cmd

Anyone?
Ghost110 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



All times are GMT. The time now is 07:47 AM.


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