euionut Posted July 19, 2016 Report Share Posted July 19, 2016 (edited) 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 July 19, 2016 by euionut Incomplet Link to comment Share on other sites More sharing options...
0 euionut Posted July 20, 2016 Author Report Share Posted July 20, 2016 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 More sharing options...
0 Daedric-Fox Posted July 19, 2016 Report Share Posted July 19, 2016 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 More sharing options...
0 euionut Posted July 20, 2016 Author Report Share Posted July 20, 2016 Din pacate nu functioneaza X_X Link to comment Share on other sites More sharing options...
Question
euionut
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):
Am mai incercat si:
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da.
Incomplet
Link to comment
Share on other sites
3 answers to this question
Recommended Posts