[Ajuda] Concessionaria
#6

@edit esta correto

um pequeno erro

PHP код:

stock CreatePlayerVehicle
(playeridmodel)
{
    new
        
file[64]
    ;
    for( new 
vMAX_CARSv++ ){
        
format(file64CARROSv);
        if(
DOF2_FileExists(file)) continue; // Aqui estava o erro
        
VehicleInfo[v][ModelID] = model;
        
VehicleInfo[v][NrPlate] = "BB-0000";
        
format(VehicleInfo[v][Owner], 100"%s"RPName(playerid));
        
VehicleInfo[v][posX] = -156.0357;
        
VehicleInfo[v][posY] = 1181.0258;
        
VehicleInfo[v][posZ] = 19.3808;
        
VehicleInfo[v][posA] = 179.2710;
        
VehicleInfo[v][ColorA] = random(5);
        
VehicleInfo[v][ColorB] = random(5);
        
VehicleInfo[v][Locked] = 1;
        
VehicleInfo[v][Faction] = 0;
        
DOF2_CreateFile(v);
        
DOF2_SetInt(file"ModelID"VehicleInfo[v][ModelID]);
        
DOF2_SetString(file"Owner"VehicleInfo[v][Owner]);
        
DOF2_SetString(file"NrPlate"VehicleInfo[v][NrPlate]);
        
DOF2_SetFloat(file"Position X"VehicleInfo[v][posX]);
        
DOF2_SetFloat(file"Position Y"VehicleInfo[v][posY]);
        
DOF2_SetFloat(file"Position Z"VehicleInfo[v][posZ]);
        
DOF2_SetFloat(file"Position A"VehicleInfo[v][posA]);
        
DOF2_SetInt(file"ColorA"VehicleInfo[v][ColorA]);
        
DOF2_SetInt(file"ColorB"VehicleInfo[v][ColorB]);
        
DOF2_SetInt(file"Locked"VehicleInfo[v][Locked]);
        
DOF2_SetInt(file"Faction"VehicleInfo[v][Faction]);
        
DOF2_SaveFile();
        
VEICULOS_CONCESSIONARIA[v] = CreateVehicleVehicleInfo[v][ModelID], VehicleInfo[v][posX],VehicleInfo[v][posY],VehicleInfo[v][posZ],VehicleInfo[v][posA], VehicleInfo[v][ColorA], VehicleInfo[v][ColorB], -1);
        
PutPlayerInVehicle(playeridVEICULOS_CONCESSIONARIA[v], 0);
        break;
    }
    return 
1;

Reply


Messages In This Thread
Concessionaria - by FernandoDutra - 30.06.2016, 16:52
Re: Concessionaria - by Cleyson - 30.06.2016, 16:59
Re: Concessionaria - by FernandoDutra - 30.06.2016, 17:02
Re: Concessionaria - by Cleyson - 30.06.2016, 19:10
Re: Concessionaria - by Whoo - 30.06.2016, 19:48
Respuesta: Re: Concessionaria - by SammyJ - 01.07.2016, 02:14

Forum Jump:


Users browsing this thread: 2 Guest(s)