28.03.2015, 20:26
Nгo, faзa o seguinte:
Vocк pode ter problemas, pois tenho certeza que estб editando outro sistema. Й mais fбcil criar o seu, exemplo:
PHP код:
new st[35];
for(new i = 1; i < MAX_VEHICLES; i++) // mudei para MAX_VEHICLES, ae posso colocar couquer valor nй amigo? atй 1000 por exemplo?
{
format(st, sixeof st, "Concessionaria/Veiculos/%d.ini", i);
if(!fexist(st))
{
dini_Create(st);
dini_Set(st, "Owner", name);
dini_IntSet(st, "Vehicle ID", 411);
dini_IntSet(st, "Valor", 1500000);
dini_IntSet(st, "Color 1", 1);
dini_IntSet(st, "Color 2", 1);
dini_FloatSet(st, "Position X", X);
dini_FloatSet(st, "Position Y", Y);
dini_FloatSet(st, "Position Z", Z);
dini_FloatSet(st, "Facing Angle", A);
VehicleInfo[i][vOwner] = name;
VehicleInfo[i][i] = 411;
VehicleInfo[i][vValor] = 1500000;
VehicleInfo[i][vColor1] = 1;
VehicleInfo[i][vColor2] = 1;
VehicleInfo[i][vX] = X;
VehicleInfo[i][vY] = Y;
VehicleInfo[i][vZ] = Z;
VehicleInfo[i][vA] = A;
break; // para a loop
}
}
PHP код:
#define MAX_MKV 500
enum mk
{
MKID,
MKModelo,
Float: MKX
Float: MKY,
Float: MKZ,
Float: MKAng,
MKCor1,
MKCor2,
MKDono[MAX_PLAYER_NAME],
MKValor
}
new Veiculo[MAX_MKV][mk];
CriarVeiculo(valor, modelo, Float: x, Float: y, Float: z, Float: ang, cor1, cor2)
{
new st[35];
for(new i = 0; i < MAX_MKV; i++)
{
format(st, sixeof st, "Concessionaria/Veiculos/%d.ini", i);
if(!fexist(st))
{
dini_Create(st);
dini_Set(st, "Dono", "Ninguem");
dini_IntSet(st, "Modelo", modelo);
dini_IntSet(st, "Valor", valor);
dini_IntSet(st, "Cor 1", cor1);
dini_IntSet(st, "Cor 2", cor2);
dini_FloatSet(st, "X", x);
dini_FloatSet(st, "Y", y);
dini_FloatSet(st, "Z", z);
dini_FloatSet(st, "FAng", ang);
Veiculo[i][MKModelo] = modelo;
Veiculo[i][MKX] = x;
Veiculo[i][MKY] = y;
Veiculo[i][MKZ] = z;
Veiculo[i][MKAng] = ang;
Veiculo[i][MKCor1] = cor1;
Veiculo[i][MKCor2] = cor2;
format(Veiculo[i][MKDono], MAX_PLAYER_NAME, "Ninguem");
Veiculo[i][MKValor] = valor;
Veiculo[i][MKID] = CreateVehicle(modelo, x, y, z, ang, cor1, cor2, -1);
return 1;
}
}
return 0;
}