09.11.2016, 06:54
https://sampwiki.blast.hk/wiki/IsValidVehicle
it states that "isvalidvehicle" function is not defined in the include. So, I would recommend you to add
On top in your script with all the other variables you might have there.
Then try to recompile. Next time - use ****** for this
btw i found a mistake in the code above. Instead of carid he had used vehicleid, which is not an entering parameter for the function:
it states that "isvalidvehicle" function is not defined in the include. So, I would recommend you to add
Код:
native IsValidVehicle(vehicleid);
Then try to recompile. Next time - use ****** for this
btw i found a mistake in the code above. Instead of carid he had used vehicleid, which is not an entering parameter for the function:
PHP код:
LockGangVehicle(family, carid, type)
{
if(!IsValidVehicle(carid)) // replaced vehicleid with carid
return;
new v = GetGangVehicle(family, carid);
if(FamilyVehicleInfo[family][v][fvId] == carid && type == 2)
{
LockStatus[carid] = 1;
vehicle_lock_doors(carid);
}
}
UnLockGangVehicle(family, carid, type)
{
if(!IsValidVehicle(carid)) // replaced vehicleid with carid
return;
new v = GetGangVehicle(family, carid);
if(FamilyVehicleInfo[family][v][fvId] == carid && type == 2)
{
LockStatus[carid] = 0;
vehicle_unlock_doors(carid);
}
}