[Help] About /v park command
#1

Hey bros, help please, ****** and bros I'm counting on you, I asked pretty much every better scripter I know and they didn't know how to solve itd, when i type /v and than select park vehicle parks at that position I mean x,y,z are okay but vehicle angle is a problem it sets like there ongamemodeinit:

Код:
for(new i=238;i<589;i++)
{
if(VehInfo[i][vNotonsell] == 0  && VehInfo[i][vAparked] == 0)
{
VehInfo[i][vehX] = PozAuta[i-238][1];
VehInfo[i][vehY] = PozAuta[i-238][2];
VehInfo[i][vehZ] = PozAuta[i-238][3];
VehInfo[i][vehA] = PozAuta[i-238][4];
VehInfo[i][vPaintjob] = 999;
}
else if(VehInfo[i][vNotonsell] == 1||VehInfo[i][vNotonsell] == 0 && VehInfo[i][vAparked] == 0)
{
new vFile[50];
format(vFile, sizeof(vFile), VEHPATH, i);
INI_ParseFile(vFile, "Loadveh", .bExtra = true, .extra = i);
}
if(SellVeh(i) && VehInfo[i][vNotonsell] == 1)
{
		if(VehInfo[i][vPaintjob] != 999)
		{
			ChangeVehiclePaintjob(i, VehInfo[i][vPaintjob]);
		}
		SetVehicleModifications(i);
}
caronsell[i-238] = AddStaticVehicle(floatround(PozAuta[i-238][0],floatround_round),VehInfo[i][vehX],VehInfo[i][vehY],VehInfo[i][vehZ],VehInfo[i][vehA],floatround(PozAuta[i-238][5],floatround_round),floatround(PozAuta[i-238][6],floatround_round));
}
command:
Код:
CMD:v(playerid, params[])
{
if(PlayerInfo[playerid][pVeh1] == 0 && PlayerInfo[playerid][pVeh2] == 0 && PlayerInfo[playerid][pVeh3] == 0) return SCM(playerid, -1, "{FFFF00}[LZ]{AFAFAF} Ne posedujete vozilo.");
ShowPlayerDialog(playerid, 12341, DIALOG_STYLE_LIST,"{FFFF00}|LZ|Izaberite vozilo", "Vehicle 1\nVehicle 2\nVehicle 3", "Select", "Izlaz");
return 1;
}
dialog response:
Код:
if(dialogid == 12341)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, 12318, DIALOG_STYLE_LIST, "{FFFF00}|LZ|Vozilo 1", "Lock/Unlock\nFind\nColor\nPark\nSell\nSell to", "Izaberi", "Izlaz");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 12319, DIALOG_STYLE_LIST, "{FFFF00}|LZ|Vozilo 2", "{FFFF00}|LZ|Vozilo 1", "Lock/Unlock\nFind\nColor\nPark\nSell\nSell to", "Izaberi", "Izlaz");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, 12340, DIALOG_STYLE_LIST, "{FFFF00}|LZ|Vozilo 3", "{FFFF00}|LZ|Vozilo 1", "Lock/Unlock\nFind\nColor\nPark\nSell\nSell to", "Izaberi", "Izlaz");
}
}
}
listitem for park this is the main thing
Код:
if(listitem == 3)
{
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1, "{FFFF00}[LZ]{AFAFAF} Morate biti u vozilu.");
if(PlayerInfo[playerid][pVeh3] != GetPlayerVehicleID(playerid)) return SCM(playerid, -1, "{FFFF00}[LZ]{AFAFAF} Morate biti u svom vozilu.");
new Float:xe,Float:ye,Float:ze;
new Float:ae;
new vehid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehid, xe,ye,ze);
GetVehicleZAngle(vehid, ae);
VehInfo[vehid][vehX] = xe;
VehInfo[vehid][vehY] = ye;
VehInfo[vehid][vehZ] = ze;
VehInfo[vehid][vehA] = ae;
VehInfo[vehid][vAparked] = 0;
SaveVehicleComponents(vehid);
//SetVehicleZAngle(vehid, ae);
VehOsnova(vehid);
SetVehicleToRespawn(vehid);
GameTextForPlayer(playerid, "~w~VOZILO PARKIRANO~N~OD SADA CE SE SPAWNATI OVDE", 3000,3);
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //nista znaci samo je problem u tom uglu :P imam i pod onvehiclespawn ovo:
Код:
if(SellVeh(vehicleid))
{
if(VehInfo[vehicleid][vNotonsell] == 1||VehInfo[vehicleid][vNotonsell] == 0 && VehInfo[vehicleid][vAparked] == 1)
{
SetVehiclePos(vehicleid, VehInfo[vehicleid][vehX],VehInfo[vehicleid][vehY],VehInfo[vehicleid][vehZ]);
//SetVehicleZAngle(vehicleid, VehInfo[vehicleid][vehA]);
}
}
I also have this onvehiclespawn:

Код:
if(SellVeh(vehicleid))
{
if(VehInfo[vehicleid][vNotonsell] == 1||VehInfo[vehicleid][vNotonsell] == 0 && VehInfo[vehicleid][vAparked] == 1)
{
SetVehiclePos(vehicleid, VehInfo[vehicleid][vehX],VehInfo[vehicleid][vehY],VehInfo[vehicleid][vehZ]);
//SetVehicleZAngle(vehicleid, VehInfo[vehicleid][vehA]);
}
}
Reply
#2

SOMEONE PLEASE? Also when I try to park my car it says that I don't have a vehicle on that slot but I do I can lock it and stuff
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)