BUG in my FilterScript.
#1

I am using Carlito's Roleplay script and am having trouble with the car respawning feature. (At least this is what I've firgured out)
When I respawn all the cars, they go back to their location like they should, however it affects even cars that I've made for sale when I park them.
I'd like the cars that are parked to stay there and be able to use respawning feature without an issue. (The /admincarpark command works flawlessly.)


This is the car parking system:

if(strcmp(cmd, "/park", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You dont have a car!");
return 1;
}
SaveCars();
SendClientMessage(playerid,COLOR_GREEN," Your car will now spawn here.");
}
return 1;
}

return 0;
}


While this is the respawning feature:

if(strcmp(cmd, "/respawnvehicles", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 5)
{
for(new i=0;i<MAX_VEHICLES;i++)
{
if(IsVehicleOccupied(i) == 0)
{
SetVehicleToRespawn(i);
}
}
format(string, sizeof(string), "[INFO:] Unoccupied vehicles respawned by %s.", GetPlayerNameEx(playerid));
SendClientMessageToAll(COLOR_ADMINCMD, string);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "Your not an administrator.");
}
return 1;
}


I've tried editing other posted scripts and tried changeing bits and pieces, but I need a more knowledable touch.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)