Detaljan opis problema: Kad parkiram auto on nestane i ne spremaju se koordinate gdje je parkiran ! Znaci nestane i nemoze se nikako nac, vec se nalazi tamo u selendri na nultim koordinatama !
Dio skripte:
if(strcmp(tmp, "park", true) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(!fexist(filename))
{
SendClientMessage(playerid, COLOR_RED, "Ne posedujete vozilo.");
return 1;
}
if(GetPVarInt(playerid, "SpawnedVehicle") == 0)
{
SendClientMessage(playerid, COLOR_RED, "Niste ni spawnali vozilo!");
return 1;
}
if(!IsPlayerInVehicle(playerid, GetPVarInt(playerid, "UsingCar")))
{
SendClientMessage(playerid, COLOR_RED, "Morate biti u svom vozilu!");
return 1;
}
if(GetPlayerVehicleSeat(playerid) != 0)
{
SendClientMessage(playerid, COLOR_RED, "Morate biti u svom vozilu na vozackom mestu!");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 4.0, GetPVarFloat(playerid, "cPositionX"), GetPVarFloat(playerid, "cPositionY"), GetPVarFloat(playerid, "cPositionZ")))
{
SendClientMessage(playerid, COLOR_RED, "Morate biti na parkirnom mestu!");
return 1;
}
if(carspawntimer == 1)
{
SendClientMessage(playerid, COLOR_RED, "Pokusajte za 10-ak sekundi. (Anticrash)");
return 1;
}
new Float:X, Float:Z, Float:Y, Float:angle, Float:health;
//new panels, doors, lights, tires;
GetVehiclePos(GetPVarInt(playerid, "UsingCar"), X,Y,Z);
GetVehicleZAngle(GetPVarInt(playerid, "UsingCar"), angle);
GetVehicleHealth(GetPVarInt(playerid, "UsingCar"), health);
//GetVehicleDamageStatus(GetPVarInt(playerid, "UsingCar"), panels, doors, lights, tires);
SetPVarFloat(playerid, "cPositionX", X);
SetPVarFloat(playerid, "cPositionY", Y);
SetPVarFloat(playerid, "cPositionZ", Z);
SetPVarFloat(playerid, "cAngle", angle);
SetPVarFloat(playerid, "cHealth", health);
/*SetPVarInt(playerid, "cPanels", 0);
SetPVarInt(playerid, "cDoors", 0);
SetPVarInt(playerid, "cLights", 0);
SetPVarInt(playerid, "cTires", 0);*/
SetPVarInt(playerid, "cFuel", Gas[GetPVarInt(playerid, "UsingCar")]);
carspawntimer = 1;
SetTimer("AntiSpawnCrash", 8000, 0);
SavePlayerVehicle(playerid, GetPVarInt(playerid, "cNumber"));
DestroyVehicle(GetPVarInt(playerid, "UsingCar"));
vehonline--;
DuplicatedKeyCheck(GetPVarInt(playerid, "UsingCar"));
SendClientMessage(playerid, COLOR_WHITE, "Uspesno ste spremili vozilo!");
//ResetPlayerVehicle(playerid);
SetPVarInt(playerid, "SpawnedVehicle", 0);
SetPVarInt(playerid, "cNumber", 0);
if(GetPVarInt(playerid, "VehicleTakeTimerCalled") == 1)
{
KillTimer(GetPVarInt(playerid, "VehicleTake"));
SetPVarInt(playerid, "VehicleTakeTimerCalled", 0);
if(IsABoat(GetPVarInt(playerid, "cModel")))
{
for(new i = 0; i < sizeof(BoatBuySpawn); i++)
{
if(BoatBuySpawn == playerid)
{
BoatBuySpawn = 999;
break;
}
else
continue;
}
}
else if(IsAPlane(GetPVarInt(playerid, "cModel")+400))
{
for(new i = 0; i < sizeof(PlaneBuySpawn); i++)
{
if(PlaneBuySpawn == playerid)
{
PlaneBuySpawn = 999;
break;
}
else
continue;
}
}
else
{
for(new i = 0; i < sizeof(CarBuySpawn); i++)
{
if(CarBuySpawn == playerid)
{
CarBuySpawn = 999;
break;
}
}
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno): /
