/o command
#1

Hey guys, my /o command won't work, here is the code.

PHP код:
}
CMD:o(playeridparams[])
{
    if(
gPlayerLogged{playerid} == 0)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"You're not logged in.");
        return 
1;
    }
    if ((
noooc) && (PlayerInfo[playerid][pAdmin] < && EventKernel[EventCreator] != playerid && !OOCPower[playerid] && PlayerInfo[playerid][pHelper] < 4))
    {
        
SendClientMessageEx(playeridCOLOR_RED"   The OOC Global Channel has been disabled by  Admins");
        return 
1;
    }
    if(
gOoc[playerid])
    {
        
SendClientMessageEx(playeridTEAM_CYAN_COLOR"   You have disabled OOC Chat, re-enable with /togooc!");
        return 
1;
    }
    if(
isnull(params)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: (/o)oc [ooc chat]");
    if(
PlayerInfo[playerid][pAdmin] == 1)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( Server Moderator %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 2)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {808000}Junior Admin{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 3)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {008080}General Admin{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 4)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {FFFF00}Senior Admin{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 1337)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {FF00FF}Head Admin{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 1338)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {FF0000}Admin Director{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 99998)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {00FFFF}Community Manager{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pAdmin] == 99999)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( {00FF00}Community Owner{FFFFFF} %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
    }
    else if(
PlayerInfo[playerid][pHelper] == 2)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( Community Advisor %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
        return 
1;
    }
    else if(
PlayerInfo[playerid][pHelper] == 3)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( Senior Advisor %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
        return 
1;
    }
    else if(
PlayerInfo[playerid][pHelper] == 4)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( Chief Advisor %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
        return 
1;
    }
    else if(
PlayerInfo[playerid][pAdmin] < && PlayerInfo[playerid][pHelper] <= 2)
    {
        new 
string[128];
        
format(stringsizeof(string), "(( %s: %s ))"GetPlayerNameEx(playerid), params);
        
OOCOff(COLOR_OOC,string);
        return 
1;
    }
    return 
1;

Reply
#2

Look at you fifth line you have {playerid} instead of (playerid)
Reply
#3

Quote:
Originally Posted by Gilbonzo
Посмотреть сообщение
Look at you fifth line you have {playerid} instead of (playerid)
I added () i was getting errors, then i added [] and still now working.
Reply
#4

Quote:
Originally Posted by TheSnaKe
Посмотреть сообщение
I added () i was getting errors, then i added [] and still now working.
{ opens and } close.
So by doing {playerid} is the same as doing
pawn Код:
{
playerid
}
Reply
#5

Show the errors
Reply
#6

Quote:
Originally Posted by Jing_Chan
Посмотреть сообщение
Show the errors
Here is.

Код HTML:
C:\Users\For SAMP\Desktop\RP\gamemodes\RP.pwn(37993) : error 012: invalid function call, not a valid address
C:\Users\For SAMP\Desktop\RP\gamemodes\RP.pwn(37993) : warning 215: expression has no effect
C:\Users\For SAMP\Desktop\RP\gamemodes\RP.pwn(37993) : error 001: expected token: ";", but found ")"
C:\Users\For SAMP\Desktop\RP\gamemodes\RP.pwn(37993) : error 029: invalid expression, assumed zero
C:\Users\For SAMP\Desktop\RP\gamemodes\RP.pwn(37993) : fatal error 107: too many error messages on one line
Reply
#7

Show line 37993
Reply
#8

Come on dude, you could at least mark 37993 line.. was that so hard?
Reply
#9

Quote:
Originally Posted by erminpr0
Посмотреть сообщение
Come on dude, you could at least mark 37993 line.. was that so hard?
Код:
if(gPlayerLogged(playerid) == 0)
Reply
#10

pawn Код:
if(gPlayerLogged[playerid] == 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)