Hoi leute.
Ich weiss nicht wieso aber meine Cars spawnen einfach nicht obwohl was in der DB eingetragen ist und alles funktionirt aber die cars spawnen nicht ich hab mal mit Print alles durch gesucht
[20:37:03] Creating 4 vehicles
[20:37:03] Befor Create
[20:37:03] Float X
[20:37:03] Float Y
[20:37:03] Flaot Z
[20:37:03] Float Rotatioin
[20:37:03] color1
[20:37:03] color2
[20:37:03] fraktion
Das is die Log
und hier meine coods!
new Query[256];
samp_mysql_query("SELECT * FROM `vehicle`");
samp_mysql_store_result();
new Vehicles = samp_mysql_num_rows();
new Float:X;
new Float:Y;
new Float:Z;
new Float:Rotation;
printf("Creating %d vehicles",Vehicles)
for (new Vehicle = 0; Vehicle < Vehicles; Vehicle++)
{
print("Befor Create");
format(Query,sizeof(Query),"SELECT `ModelID` FROM `vehicle` LIMIT %d,1",Vehicle);
new ModelID=strval(GetMySQLResult(Query));
if (ModelID>=400 && ModelID<=611)
{
format(Query,sizeof(Query),"SELECT `X` FROM `vehicle` LIMIT %d,1",Vehicle);
X=floatstr(GetMySQLResult(Query));
print("Float X");
format(Query,sizeof(Query),"SELECT `Y` FROM `vehicle` LIMIT %d,1",Vehicle);
Y=floatstr(GetMySQLResult(Query));
print("Float Y");
format(Query,sizeof(Query),"SELECT `Z` FROM `vehicle` LIMIT %d,1",Vehicle);
Z=floatstr(GetMySQLResult(Query));
print("Flaot Z");
format(Query,sizeof(Query),"SELECT `Rotation` FROM `vehicle` LIMIT %d,1",Vehicle);
Rotation=floatstr(GetMySQLResult(Query));
print("Float Rotatioin");
format(Query,sizeof(Query),"SELECT `Color1` FROM `vehicle` LIMIT %d,1",Vehicle);
new Color1=strval(GetMySQLResult(Query));
print("color1");
format(Query,sizeof(Query),"SELECT `Color2` FROM `vehicle` LIMIT %d,1",Vehicle);
new Color2=strval(GetMySQLResult(Query));
print("color2");
format(Query,sizeof(Query),"SELECT `FraktionsID` FROM `vehicle` LIMIT %d,1",Vehicle);
new FraktionsID=strval(GetMySQLResult(Query));
print("fraktion");
CreateVehicleEx(ModelID,X,Y,Z,Rotation,Color1,Color2,FraktionsID);
print("createcar");
print("After Create");
}
else
{
printf("Invalid Model ID (%d) in MySQL table 'vehicles' row %d",ModelID,(Vehicle+1));
}
}
stock CreateVehicleEx(ModelID,Float:X,Float:Y,Float:Z,Float:Rotation,Color1,Color2,FraktionsID)
{
new Vehicles[MAX_VEHICLES];
new VehicleID = CreateVehicleEx(ModelID,X,Y,Z,Rotation,Color1,Color2,FraktionsID);
Vehicles[VehicleID] = 1000;
}
Woran kann das liegen?
und mein Tacho geht dan auch nich wen die cars ned spawnen -.-