Hayho,
ich habe heute angefangen an einem etwas anderen Fraktionsfahrzeugs-System zu tüfteln und ich habe da ein kleines Problem.
Folgende Zeilen:
for(new i=0; i<rows+1; i++)
{
new vid, Float:x, Float:y, Float:z, Float:rot, c1, c2, cfrak;
vid = mysql_getint(db_handle,"frakcars","vid","id",i);
x = mysql_getfloat(db_handle,"frakcars","x","id",i);
y = mysql_getfloat(db_handle,"frakcars","y","id",i);
z = mysql_getfloat(db_handle,"frakcars","z","id",i);
rot = mysql_getfloat(db_handle,"frakcars","rot","id",i);
c1 = mysql_getint(db_handle, "frakcars","c1","id",i);
c2 = mysql_getint(db_handle, "frakcars","c2","id",i);
cfrak = mysql_getint(db_handle, "frakcars","frak","id",i);
new vehID = AddStaticVehicleEx(vid,x,y,z,rot,c1,c2,-1);
}
In diesem Zustand funktioniert alles einwandfrei, aber ich will ja noch das Fahrzeug einer Fraktion zuweisen, also füge ich folgende Zeile noch ein:
CarFraktion[vehID] = cfrak;, also steht alles so da: for(new i=0; i<rows+1; i++)
{
new vid, Float:x, Float:y, Float:z, Float:rot, c1, c2, cfrak;
vid = mysql_getint(db_handle,"frakcars","vid","id",i);
x = mysql_getfloat(db_handle,"frakcars","x","id",i);
y = mysql_getfloat(db_handle,"frakcars","y","id",i);
z = mysql_getfloat(db_handle,"frakcars","z","id",i);
rot = mysql_getfloat(db_handle,"frakcars","rot","id",i);
c1 = mysql_getint(db_handle, "frakcars","c1","id",i);
c2 = mysql_getint(db_handle, "frakcars","c2","id",i);
cfrak = mysql_getint(db_handle, "frakcars","frak","id",i);
new vehID = AddStaticVehicleEx(vid,x,y,z,rot,c1,c2,-1);
CarFraktion[vehID] = cfrak;
}
Starte den Server und plötzlich steht da:
ZitatNumber of vehicle models: 0
Kann mir da einer helfen?!