[Tutorial] How to make groups/teams and how to set team cars and team cmds.(y_groups / y_classes / y_commands)
#9

^

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    switch(newstate) {
        case PLAYER_STATE_ONFOOT: {
            switch(oldstate) {
                case PLAYER_STATE_DRIVER: OnPlayerExitVehicle(playerid,255);
                case PLAYER_STATE_PASSENGER: OnPlayerExitVehicle(playerid,255);
            }
        }
    }
    new vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
    new Float:PX, Float:PY, Float:PZ;  
    if(vehicle == 492 || vehicle == 412 )
    {
       if(gTeam[playerid] != TEAM_GROVE) //Or whatever
       {
          GetPlayerPos(playerid,PX,PY,PZ);
          SetPlayerPos(playerid,PX,PY,PZ+3);
          SendClientMessage(playerid,COLOR_RED,"[ERROR]: This car is locked only grove street members can use it.");
       }

    }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)