Locking vehicles
#1

Ok, I have my scirpt set up so if you're not taking a drivers test the driving test cars should be locked, And same with planes if you don't have a license they're locked but for some reason they're not locking like they're suppose to, So when you're taking a driver test the driver license cars becomes unlocked then after you're done it becomes locked and you can never enter it again unless you have to take the driving test. Then with planes, they are locked till you take the test and pass it, Then once you pass it all planes become unlocked but if you don't pass it all planes remain locked

pawn Код:
if(IsADLicensecar(i))
{
if(drivertest[playerid] >= 1)
{
SetVehicleParamsForPlayer(i,playerid,0,0);
}
else
{
SetVehicleParamsForPlayer(i,playerid,1,1);
}
}
It's pretty much the same with my plane system. I'm getting no errors, Just the cars/planes aren't locking at all.
Reply
#2

pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
if(IsADLicensecar(vehicleid))
{
if(drivertest[forplayerid] >= 1)
{
SetVehicleParamsForPlayer(vehicleid,forplayerid,0,0);
}
else
{
SetVehicleParamsForPlayer(vehicleid,forplayerid,1,1);
}
}
}
0.3 will reset the locked car when it streams out, therefore you will need to use this function above.
Reply
#3

Thank you for the reply, Will give this a try
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)