26.02.2017, 17:18
(
Последний раз редактировалось danielpalade; 25.09.2017 в 21:58.
)
-- DELETED --
public OnPlayerConnect(playerid)
{
new vID = INVALID_VEHICLE_ID;
//Loop all vehicles to get the free slot (Maybe it isn't the best method to do that)
for(new i=0; i>MAX_VEHICLES; i++)
{
if(!IsValidVehicle(i))
{
//This slot is free
vID = i;
break;
}
}
//This means that we have a free slot and we can create a vehicle.
if(vID != INVALID_VEHICLE_ID)
{
//Request data from DB, assign to vID slot in vehicleVariables array and create the vehicle.
}
return 1;
}