OnPlayerRequestClass and /colorhelp
#1

Greetings,


Hellp there, I am trying to add a new class only to players who have permission.

pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
    if(classid == 3 && !IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,0xFF9D1CAA,"ERROR: This skin is only to players who have the NG permission.");
        return 0;
    }
    return 1;
}
And when I put this into the
pawn Код:
public OnPlayerRequestClass(playerid, classid)
it says me
Код:
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\gamemodes\GangWars.pwn(444) : error 055: start of function body without function header
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\gamemodes\GangWars.pwn(445) : error 010: invalid function or declaration
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\gamemodes\GangWars.pwn(448) : error 010: invalid function or declaration
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\gamemodes\GangWars.pwn(450) : error 010: invalid function or declaration
And this is the way what I have
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

{
    if(classid == 3 && !IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,0xFF9D1CAA,"ERROR: This skin is only for players who have the permission.");
        return 0;
    }
    return 1;
}
Thanks, all help will be appreciated.

Regards,
Pablo.
Reply


Messages In This Thread
OnPlayerRequestClass and /colorhelp - by PabloDiCostanzo - 08.03.2013, 19:41
Re: OnPlayerRequestClass and /colorhelp - by SilverKiller - 08.03.2013, 19:55
Re: OnPlayerRequestClass and /colorhelp - by PabloDiCostanzo - 08.03.2013, 21:53
Re: OnPlayerRequestClass and /colorhelp - by SilverKiller - 08.03.2013, 22:03
Re: OnPlayerRequestClass and /colorhelp - by PabloDiCostanzo - 08.03.2013, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)