OOC Toggle Help
#1

Basically when im level 5 it works but if im level 0 its doesn't like it should but the message at the bottom isn't showing

pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
{
if(oocstatus == 0){
oocstatus = 1;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
}
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
else
{
return SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
}
return 1;
}
Reply
#2

Try this:

pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    if(oocstatus == 0){
    oocstatus = 1;
    SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
    }
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
else
{
SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
}
return 1;
}
If it doesnt work, tell me.
Reply
#3

Probably because you haven't indented it at all, I'll do it and get back to you.

pawn Код:
CMD:ooctoggle(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        if(oocstatus == 0){
        oocstatus = 1;
        SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
    }
    else
    {
        if(oocstatus == 1){
        oocstatus = 0;
        SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
    }
    else return SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
    return 1;
}
Try this
Reply
#4

No its can't read the .amx now
Reply
#5

Uhm.. Try this:
pawn Код:
CMD:ooctoggle(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        if(oocstatus == 0){
            oocstatus = 1;
            SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
        }
        else if(oocstatus == 1){
            oocstatus = 0;
            SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
        }
    }
    else
    {
        SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
    }
    return 1;
}
Reply
#6

Did it wrong sorry.

pawn Код:
CMD:ooctoggle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    if(oocstatus == 0){
    oocstatus = 1;
    SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Disabled By An Administrator");
    }
else if(oocstatus == 1){
oocstatus = 0;
SendClientMessageToAll(COLOR_GREY,"OOC Chat Has Been Enabled By An Administrator");
}
}
else
{
SendClientMessage(playerid,KNOWNCOLOR_ORCHID,"Your Not The Correct Level To Use This Commend");
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)