Gang Cars
#6

Here ye go
pawn Код:
#define MAX_GANGS 2

#define GANG_IR 0

#define GANG_GS 1

#define MAX_GANG_VEHICLES 10

new GangCars[MAX_GANGS][MAX_GANG_VEHICLES];
public OnGameModeInit()
{
  GangCars[GANG_IR][0]=AddStaticVehicle(522,0,0,0,0,-1,-1);//IR, gang vehicles can go up 9 (because MAX_GANG_VEHICLES is 10)
  GangCars[GANG_IR][1]=AddStaticVehicle(522,0,0,0,0,-1,-1);
  GangCars[GANG_IR][2]=AddStaticVehicle(522,0,0,0,0,-1,-1);
  GangCars[GANG_GS][0]=AddStaticVehicle(522,0,0,0,0,-1,-1);
  GangCars[GANG_GS][1]=AddStaticVehicle(522,0,0,0,0,-1,-1);
  GangCars[GANG_GS][2]=AddStaticVehicle(522,0,0,0,0,-1,-1);
  return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
  if(newstate==PLAYER_STATE_DRIVER)
  {
    new pname[24];
    GetPlayerName(playerid,pname,sizeof(pname));
    for(new gangcar;gangcar<MAX_GANG_VEHICLES;gangcar++)
    {
      if(GetPlayerVehicleID(playerid)==GangCars[GANG_IR][gangcar])
      {
        if(strfind(pname,"[IR]")==-1)RemovePlayerFromVehicle(playerid);
      }
    }
    for(new gangcar;gangcar<MAX_GANG_VEHICLES;gangcar++)
    {
      if(GetPlayerVehicleID(playerid)==GangCars[GANG_GS][gangcar])
      {
        if(strfind(pname,"[GS]")==-1)RemovePlayerFromVehicle(playerid);
      }
    }
  }
  return 1;
}
For some reason I REALLY don't like that...
Reply


Messages In This Thread
Gang Cars - by icorne - 17.01.2010, 17:42
Re: Gang Cars - by akis_tze - 17.01.2010, 21:01
Re: Gang Cars - by akis_tze - 17.01.2010, 21:04
Re: Gang Cars - by akis_tze - 17.01.2010, 21:05
Re: Gang Cars - by Rzzr - 17.01.2010, 22:29
Re: Gang Cars - by Joe Staff - 17.01.2010, 22:57

Forum Jump:


Users browsing this thread: 1 Guest(s)