Jump to content
  • 0

Inchidere vehicule


euionut

Question

Problema intalnita (descriere): Nu reusesc sa inchid un vehicul pentru toti jucatorii online dar cu exceptia celui care o spawneaza.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): 

CMD:work(playerid, params[])
{
   JobVeh[playerid] = AddStaticVehicleEx(448, Xf,Yf,Zf, 90,-1,-1, 90);
   for(new i=0; i < MAX_PLAYERS; i++)
   {
       if(i == playerid) continue;
       SetVehicleParamsForPlayer(JobVeh[playerid],i,0,1);
   }
}

Am mai incercat si:

CMD:work(playerid, prams[])
{
   JobVeh[playerid] = AddStaticVehicleEx(448, Xf,Yf,Zf, 90,-1,-1, 90);
   SetVehicleParamsEx_Fixed(JobVeh[playerid], &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective)
}
Quote

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
      if(JobVeh[playerid] == vehicleid)
      {
            SetVehicleParamsEx(JobVeh[playerid],engine,lights,alarm,0,bonnet,boot,objective);
      }
      else
      {
            SetVehicleParamsEx(JobVeh[playerid],engine,lights,alarm,1,bonnet,boot,objective);
      }
      return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.

Edited by euionut
Incomplet
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Am reusit!

Quote

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(JobVeh[playerid] != vehicleid) // if player is trying to enter locked vehicle and he is not bound to that vehicle
    {
        TogglePlayerControllable(playerid, true);
    }
    return 1;
}

Multumesc de ajutor!

Link to comment
Share on other sites

  • 0
On ‎7‎/‎19‎/‎2016 at 15:56, euionut said:

Problema intalnita (descriere): Nu reusesc sa inchid un vehicul pentru toti jucatorii online dar cu exceptia celui care o spawneaza.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): 


CMD:work(playerid, params[])
{
   JobVeh[playerid] = AddStaticVehicleEx(448, Xf,Yf,Zf, 90,-1,-1, 90);
   for(new i=0; i < MAX_PLAYERS; i++)
   {
       if(i == playerid) continue;
       SetVehicleParamsForPlayer(JobVeh[playerid],i,0,1);
   }
}

Am mai incercat si:


CMD:work(playerid, prams[])
{
   JobVeh[playerid] = AddStaticVehicleEx(448, Xf,Yf,Zf, 90,-1,-1, 90);
   SetVehicleParamsEx_Fixed(JobVeh[playerid], &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective)
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.

CMD:work(playerid, params[]) { JobVeh[playerid] = AddStaticVehicleEx(448, Xf,Yf,Zf, 90,-1,-1, 90);
for(new i=0; i < MAX_PLAYERS; i++) {
       if(i != playerid) continue;
       SetVehicleParamsForPlayer(JobVeh[playerid],i,0,1);
} }

 

Incearca asa

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.