Team Cars!
#2

I'll give you an exemple, and you do the rest.

So, you have to define your cars at the top :

PHP код:
new CivilCar[2]; 
Then :


PHP код:
CivilCar[0] = AddStaticVehicle(560,1083.4089,-1755.0792,13.0921,271.8628,9,39); // civillll
CivilCar[1] = AddStaticVehicle(589,1098.1686,-1755.0533,13.0149,88.9525,31,31); // civillll 
Under :

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
   if(
newstate == PLAYER_STATE_DRIVER)
    {
        if(
GetPlayerVehicleID(playerid) == CivilCar[0] || GetPlayerVehicleID(playerid) == CivilCar[1])
        {
            if(
gTeam[playerid] != CIVILIAN)
            {
                
SendClientMessage(playerid,COLOR_RED,"Only civilians can use these vehicles.");
                
RemovePlayerFromVehicle(playerid);
                return 
1;
            }
            
SendClientMessage(playerid,-1,"[[_Civilian Vehicle_]]");
            
SendClientMessage(playerid,CIVILIAN_COLOUR,"Welcome to your Civilian vehicle.");
            return 
1;
        }
    } 
Reply


Messages In This Thread
Team Cars! - by ironmen - 16.07.2015, 09:42
Re : Team Cars! - by KillerDVX - 16.07.2015, 13:10
Re: Team Cars! - by ironmen - 16.07.2015, 13:21
Re: Re : Team Cars! - by ironmen - 16.07.2015, 13:54
AW: Team Cars! - by Mencent - 16.07.2015, 14:33
Re: Team Cars! - by ironmen - 16.07.2015, 17:08
Re : Team Cars! - by KillerDVX - 16.07.2015, 17:30
Re: Team Cars! - by ironmen - 16.07.2015, 17:48
Re : Team Cars! - by KillerDVX - 16.07.2015, 18:54
Re: Team Cars! - by ironmen - 16.07.2015, 18:57

Forum Jump:


Users browsing this thread: 3 Guest(s)