Error.
#1

Код:
CMD:help(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
	SCM(playerid,COLOR_WHITE,"/adminhelp");
    }
	SCM(playerid,COLOR_LIGHTBLUE,"__________________HELP___________________");
	SCM(playerid,COLOR_WHITE,"CAR HELP: /deletecar, /veh, /park, /addrims");
	SCM(playerid,COLOR_WHITE,"CHAT HELP: /o, /b, /local,/shout, ");
	SCM(playerid,COLOR_WHITE,"GENERAL HELP: /buylevel ");
    }
    else
    {
        SCM(playerid,COLOR_WHITE,"[SERVER]: You're not authorized to use this command");
	return 0;
    }
}
line 478-481
Код:
else
 	         {
		         SCM(playerid,COLOR_WHITE,"[SERVER]: You're not authorized to use this command");
		         return 0;
Код:
C:\Users\Bart\Downloads\Roleplay\Roleplay\gamemodes\esrp.pwn(478) : error 010: invalid function or declaration
C:\Users\Bart\Downloads\Roleplay\Roleplay\gamemodes\esrp.pwn(481) : error 010: invalid function or declaration
Reply
#2

You want if you are admin you can see the "/adminhelp" message else show only the other help?

pawn Код:
CMD:help(playerid, params[])
{
    SCM(playerid,COLOR_LIGHTBLUE,"__________________HELP___________________");
    SCM(playerid,COLOR_WHITE,"CAR HELP: /deletecar, /veh, /park, /addrims");
    SCM(playerid,COLOR_WHITE,"CHAT HELP: /o, /b, /local,/shout, ");
    SCM(playerid,COLOR_WHITE,"GENERAL HELP: /buylevel ");
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        SCM(playerid,COLOR_WHITE,"ADMIN HELP: /adminhelp");
    }
    return 1;
}
like this?
Reply
#3

Yea, thanks. you were just to late i changed it myself

Quote:

CMD:help(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SCM(playerid,COLOR_WHITE,"/adminhelp");
}
SCM(playerid,COLOR_LIGHTBLUE,"__________________HE LP___________________");
SCM(playerid,COLOR_WHITE,"CAR HELP: /deletecar, /veh, /park, /addrims");
SCM(playerid,COLOR_WHITE,"CHAT HELP: /o, /b, /local,/shout, ");
SCM(playerid,COLOR_WHITE,"GENERAL HELP: /buylevel ");
return 1;
}

Reply
#4

You can't have anything between
pawn Код:
if(something)
{
    blabla;
}
// HERE
else
{
    blabla;
}
Edit:
I just think you have an unintentional } in there:
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    SCM(playerid,COLOR_WHITE,"/adminhelp");
    // } Remove this line
    SCM(playerid,COLOR_LIGHTBLUE,"__________________HELP___________________");
    SCM(playerid,COLOR_WHITE,"CAR HELP: /deletecar, /veh, /park, /addrims");
    SCM(playerid,COLOR_WHITE,"CHAT HELP: /o, /b, /local,/shout, ");
    SCM(playerid,COLOR_WHITE,"GENERAL HELP: /buylevel ");
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)