[Help] Vehicle Spawner
#1

Hello

I have one problem!
When one of the players spawns vehicle someone others vehicle disaphears
How to fix it(I am using mSelection and this function!)
PHP Code:
function VehicleSpawner(playerid,model)
{
new 
Float:x,Float:y,Float:z,Float:a;
new 
componentid;
for (new 
i14i++)
{
componentid GetVehicleComponentInSlot(veh1[playerid], i);
if (
componentid != 0)
RemoveVehicleComponent(veh1[playerid], componentid);
}
DestroyVehicle(veh1[playerid]);
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
veh1[playerid] = CreateVehicle(model,x+1,y+1,z,a,-1,-1,-1);
SetVehicleNumberPlate(veh1[playerid],""COL_WHITE"-"COL_RED"U"COL_GREEN"G"COL_BLUE"F"COL_WHITE"-");
LinkVehicleToInterior(veh1[playerid], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(veh1[playerid],GetPlayerVirtualWorld(playerid));
SetVehiclePos(veh1[playerid],x+1,y+1,z);
SetVehicleHealth(veh1[playerid],  1000.0);
PutPlayerInVehicle(playeridveh1[playerid], 0);
return 
1;

Reply


Messages In This Thread
[Help] Vehicle Spawner - by kalanerik99 - 22.05.2015, 15:45
Re: [Help] Vehicle Spawner - by Luis- - 22.05.2015, 15:47
Re: [Help] Vehicle Spawner - by Konstantinos - 22.05.2015, 16:14
Re: [Help] Vehicle Spawner - by kalanerik99 - 22.05.2015, 16:16

Forum Jump:


Users browsing this thread: 2 Guest(s)