Certamente hб muitas coisas erradas, eu fiz аs pressas e nгo testei, mas...
PHP код:
new jobVehicle[10];
new vehJob[MAX_VEHICLES];
jobVehicle[0] = AddStaticVehicle(modelid, ...);
jobVehicle[1] = AddStaticVehicle(modelid, ...);
jobVehicle[2] = AddStaticVehicle(modelid, ...);
jobVehicle[3] = AddStaticVehicle(modelid, ...);
for (new i; i < 4; i ++)
vehJob[jobVehicle[i]] = PROF_TAXISTA;
jobVehicle[4] = AddStaticVehicle(modelid, ...);
jobVehicle[5] = AddStaticVehicle(modelid, ...);
jobVehicle[6] = AddStaticVehicle(modelid, ...);
jobVehicle[7] = AddStaticVehicle(modelid, ...);
jobVehicle[8] = AddStaticVehicle(modelid, ...);
jobVehicle[9] = AddStaticVehicle(modelid, ...);
for (new i = 4; i < 10; i ++)
vehJob[jobVehicle[i]] = PROF_...;
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
for (new i; i < sizeof(jobVehicle); i ++) if (!ispassenger && vehicleid != INVALID_VEHICLE_ID && vehJob[jobVehicle[i]] == PROF_TAXISTA && pInfo[playerid][pProfissao] != PROF_TAXISTA)
{
ClearAnimations(playerid);
return SendClientMessage(playerid, -1, "Vocк nгo tem as chaves deste veнculo.");
}
for (new i; i < sizeof(jobVehicle); i ++) if (!ispassenger && vehicleid != INVALID_VEHICLE_ID && vehJob[jobVehicle[i]] == PROF_... && pInfo[playerid][pProfissao] != PROF_...)
{
ClearAnimations(playerid);
return SendClientMessage(playerid, -1, "Vocк nгo tem as chaves deste veнculo.");
}
return 1;
}