SA-MP Forums Archive
problem with vehicle spawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: problem with vehicle spawn (/showthread.php?tid=401026)



problem with vehicle spawn - zudokuxd10 - 21.12.2012

hello, i need help D:
my dialog system of spawn vehicles dont work.
he is use this

Код HTML:
new SpawnCar[MAX_PLAYERS];

GiveVehicle(playerid, modelid)
{
new Auto, Float:x,Float:y,Float:z,Float:angulo;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
Auto = GetPlayerVehicleID(playerid);
GetVehiclePos(Auto, x, y, z);
GetVehicleZAngle(Auto, angulo);
DestroyVehicle(Auto);
}
else
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angulo);
}
if(SpawnCar[playerid] != 0) DestroyVehicle(SpawnCar[playerid]);
SpawnCar[playerid] = CreateVehicle(modelid,x,y,z,angulo,-1,-1,60);
PutPlayerInVehicle(playerid,SpawnCar[playerid],0);
LinkVehicleToInterior(Auto, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(Auto, GetPlayerVirtualWorld(playerid));
return 1;
}
in dialog response example case 0: GiveVehicle(playerid, 402);
but dont work, car dont spawn D:

and the dialogs ids is different of the others...


Re: problem with vehicle spawn - zudokuxd10 - 21.12.2012

somenone know why?


Re: problem with vehicle spawn - eesh - 21.12.2012

Код:
new SpawnCar[MAX_PLAYERS];

GiveVehicle(playerid, modelid)
{
new Auto, Float:x,Float:y,Float:z,Float:angulo;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
Auto = GetPlayerVehicleID(playerid);
GetVehiclePos(Auto, x, y, z);
GetVehicleZAngle(Auto, angulo);
DestroyVehicle(Auto);
}
else
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angulo);
}
if(SpawnCar[playerid] != 0) DestroyVehicle(SpawnCar[playerid]);
SpawnCar[playerid] = CreateVehicle(modelid,x,y,z,angulo,-1,-1,60);
PutPlayerInVehicle(playerid,SpawnCar[playerid],0);
LinkVehicleToInterior(SpawnCar[playerid], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(SpawnCar[playerid], GetPlayerVirtualWorld(playerid));
return 1;
}
try now


Re: problem with vehicle spawn - zudokuxd10 - 21.12.2012

Quote:
Originally Posted by eesh
Посмотреть сообщение
Код:
new SpawnCar[MAX_PLAYERS];

GiveVehicle(playerid, modelid)
{
new Auto, Float:x,Float:y,Float:z,Float:angulo;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
Auto = GetPlayerVehicleID(playerid);
GetVehiclePos(Auto, x, y, z);
GetVehicleZAngle(Auto, angulo);
DestroyVehicle(Auto);
}
else
{
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angulo);
}
if(SpawnCar[playerid] != 0) DestroyVehicle(SpawnCar[playerid]);
SpawnCar[playerid] = CreateVehicle(modelid,x,y,z,angulo,-1,-1,60);
PutPlayerInVehicle(playerid,SpawnCar[playerid],0);
LinkVehicleToInterior(SpawnCar[playerid], GetPlayerInterior(playerid));
SetVehicleVirtualWorld(SpawnCar[playerid], GetPlayerVirtualWorld(playerid));
return 1;
}
try now
the problem continues
i dont understand why dont spawn zz


Re: problem with vehicle spawn - eesh - 21.12.2012

Im suspecting its the dialogs


Re: problem with vehicle spawn - zudokuxd10 - 21.12.2012

Quote:
Originally Posted by eesh
Посмотреть сообщение
Im suspecting its the dialogs
i now try with

new Menu:Cars;

Cars = CreateMenu("Cars",1,20,120,150,40);
AddMenuItem(Cars,0,"INFERNUS");
AddMenuItem(Cars,0,"SULTAN");
AddMenuItem(Cars,0,"JESTER");
AddMenuItem(Cars,0,"BULLET");
AddMenuItem(Cars,0,"CHEETAH");
AddMenuItem(Cars,0,"TURISMO");
AddMenuItem(Cars,0,"FLASH");

etc etc, BUT also dont work :S
all my FS and GM Compile 100% 0 errors 0 warnings

but this is the unique problem idk why dont spawn


Re: problem with vehicle spawn - zudokuxd10 - 21.12.2012

this is not my unique problem
also my system race dont spawn vehicles -.-"

what is this? :S this is mad, really bug

EDIT : one friend said : maybe is for you vehicles number.

i check and maybe is :/
i have number of vehicles 2102

exist streamer for vehicles?
link please D: