Called during OnPlayerSpawn
Vehicle IDs of interest are 6 through 19
gParkid[playerid] (if set) is the parking space number converted to the true vehicle ID with ParkingSpotID
It works when I first connect but If i get out of MY car sometimes I cant get back in. Makes no sense because if it's only called when a player spawns then if shouldn't be unlocked then locked the next minute. Sounds like a SAMP bug to me. Anything wrong with the code?
BansheeLock(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
for(new k=6; k<20; k++)
{
new parkid, vehicleid;
if(!gParkid[playerid])
{
parkid = 0;
}
else
{
parkid = gParkid[playerid];
}
vehicleid = ParkingSpotID(parkid);
if(vehicleid != k)
{
SetVehicleParamsForPlayer(k,i,0,1);
}
}
}
return 1;
}