whats the difference between CreateVehicle and AddStaticVehicleEx? -
killar456 - 11.07.2009
would it matter if i replace AddStaticVehicleEx with CreateVehicle?
because im trying to add a streamer but mostly all are in AddStaticVehicleEx and the fuction for the vehicle streamer is CreateStreamVehicle
Re: whats the difference between CreateVehicle and AddStaticVehicleEx -
abhinavdabral - 11.07.2009
CreateVehicle is used to place the vehicles and put their respawn time,..... respawns only when destroyed
While
AddStatic one will just put the vehicle on a place.....If it destroys or moves somewhere else from its initial postion, then it will get back tehre after a short Time.
Re: whats the difference between CreateVehicle and AddStaticVehicleEx? -
killar456 - 11.07.2009
ok, im running LARP, and i want to change the
Код:
AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
to
Код:
CreateStreamVehicle(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
would that fuck anything up?
Re: whats the difference between CreateVehicle and AddStaticVehicleEx? -
abhinavdabral - 11.07.2009
whats the syntax for
CreateStreamVehicle ??
Re: whats the difference between CreateVehicle and AddStaticVehicleEx? -
killar456 - 11.07.2009
i dont know what the syntax is, but here the code
Код:
stock CreateStreamVehicle(modelid,Float:x,Float:y,Float:z,Float:a,col1,col2)
{
for(new i = 1;i<MAX_STREAM_VEHICLES;i++) {
if(VehicleInfo[i][valid] == 0) {
VehicleInfo[i][dmodel] = modelid;
VehicleInfo[i][x_spawn] = x;
VehicleInfo[i][y_spawn] = y;
VehicleInfo[i][z_spawn] = z;
VehicleInfo[i][za_spawn] = a;
VehicleInfo[i][color_1] = col1;
VehicleInfo[i][color_2] = col2;
VehicleInfo[i][valid] = 1;
VehicleInfo[i][idnum] = 0;
VehicleInfo[i][paintjob] = -1;
VehicleInfo[i][temporary] = 0;
if(VehicleInfo[i][id_prev_used] == 0) {
vehcount++;
}
UpdateVehicleSectorInfo();
return i;
}
}
return 0;
}
im a decent scripter, not good tho lol
its taxi's vehicle streamer
Re: whats the difference between CreateVehicle and AddStaticVehicleEx? -
abhinavdabral - 11.07.2009
well..i saw this code....and so You can do that ..what you asked just b4 your last post ...
Quote:
ok, im running LARP, and i want to change the
Code:
AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
to
Code:
CreateStreamVehicle(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
would that fuck anything up?
|
ALL WILL BE FINE ..JUST DO IT
Re: whats the difference between CreateVehicle and AddStaticVehicleEx? -
ledzep - 11.07.2009
Quote:
This function [AddStaticVehicle] can only create vehicles in the OnGameModeInit callback, and vehicles created with this function cannot be removed.
|
https://sampwiki.blast.hk/wiki/AddStaticVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
https://sampwiki.blast.hk/wiki/CreateVehicle
I would recommend CreateVehicle because it gives you the option to delete a spawned vehicle.