24/02/2022 20:13
(Esta mensagem foi modificada pela última vez a: 24/02/2022 20:54 por xbruno1000x.)
Hey guys, Thanks for the help. So the problem is easy but i cant seem to see the mistake i have been stuck with this thing a while. using buycar command in dealership will replace the second owned car but it should add a new vehicle to slot three(every polayer can own 3 vehicles) so if i already own 2 vehicles and try to buy third one it will replace the second one. Heres the code of /buycar:
Código:
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = LooVehicle(carid, -290,5945, 1312,6644, 54,2423, 82,0000, 0, 0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLlocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos (PlayerInfo[pleierid][pVVeh], PlayerInfo[mängija][vVX], PlayerInfo[mängija][vVY], PlayerInfo[mängija][vVZ]);
GetVehicleZAngle(PlayerInfo[mängija[pVVeh], PlayerInfo[mängija][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
tagasi 1;
}
if(PlayerInfo[playerid][vVModel])
{
PlayerInfo[playerid][pVVVeh] = LooVehicle(carid, -290,5945, 1312,6644, 54,2423, 82,0000, 0, 0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pVVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVVLokitud] = 1;
PlayerInfo[playerid][vVVModel] = carid;
GetVehiclePos(PlayerInfo[pleierid][pVVVeh], PlayerInfo[mängija][vVVX], PlayerInfo[mängija][vVVY], PlayerInfo[mängija][vVVZ]);
GetVehicleZAngle(PlayerInfo[mängija][pVVVeh], PlayerInfo[mängija][vVVA]);
PlayerInfo[pleierikood][vVVC1] = 0;
PlayerInfo[playerid][vVVC2] = 0;
tagasi 1;
}
PlayerInfo[playerid][pVeh] = LooVehicle(carid, -290,5945, 1312,6644, 54,2423, 82,0000, 0, 0,32000);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[pleierid][pVeh], PlayerInfo[pleierid][vX], PlayerInfo[pleierid][vY], PlayerInfo[pleierid][vZ]);
GetVehicleZAngle(PlayerInfo[mängija[pVeh], PlayerInfo[mängija][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;