Extra missions in PPC Trucking?
#2

Make a new system, using variables, commands, definitions

Quick Example


pawn Код:
//global variable
new PlayerTeam[MAX_PLAYERS];

//global definition
#define TEAM_NAME

//Quick OnPlayerRequestClass Example
public OnPlayerRequestClass({playerid, classid)
{
    switch( classid )
    {
        case 1 .. 10: //skin id 1 to 10 will be set to the team you've added
        {
            PlayerTeam[MAX_PLAYERS] = TEAM_NAME;
        }
    }
    return true;
}

//Quick Command Example
CMD:harvest(playerid, params[])
{
    if(PlayerTeam[playerid] != TEAM_NAME)
        return SendClientMessage(playerid, -1, "You're not in the" TEA_NAME);

    // rest of the function.
    return true;
}
Reply


Messages In This Thread
Extra missions in PPC Trucking? - by Tuntun - 07.11.2013, 16:08
Re: Extra missions in PPC Trucking? - by Patrick - 07.11.2013, 16:09
Re: Extra missions in PPC Trucking? - by Tuntun - 07.11.2013, 16:14
Respuesta: Extra missions in PPC Trucking? - by hensr - 11.11.2013, 22:33

Forum Jump:


Users browsing this thread: 2 Guest(s)