Szerző Téma: Kocsiid bugg  (Megtekintve 815 alkalommal)

Kocsiid bugg
« Dátum: 2018. Április 09. - 14:03:14 »
0
Hali egy fontos kérdésem lenne van egy mysql modom és a kocsinak nem generál id-t amikor pl lespawnolok egy kocsi /car al akkor sqlbe járműid 0 ez mi miatt lehet?
 
 
 

CMD:car(playerid, params[])// igy a jo
{
   
 if(pInfo[playerid][admin] >= 5)
{
    /*if(isnull(params))
   {
        new cars[212], i=0;
       while(i!=212)
       {
           cars = i+400;
           i++;
       }
       ShowModelSelectionMenuEx(playerid, cars, i, \"Valassz jarmuvet!\", 3, 0, 0, 20.0, 0.8);
   }*/
    new id;
    if(sscanf(params, \"d\", id)) return Malibu(playerid, \"Használat: /car [ID]\");
    if(id < 400 || id > 611) return Malibu(playerid, \"Az ID-nek 400 és 611 között kell lennie!\");
    if( id == 537 || id == 538) return Malibu(playerid, \"Nem spawnolhatsz vonatot!\");
    new Float:x, Float:y, Float:z, Float:angle;
        GetPlayerPos(playerid, x, y, z);
    GetPlayerFacingAngle(playerid, angle);
    Malibu_Green(playerid,  \"Lespawnoltál egy járművet.\");
   
    mysql_free_result();
   
    new c1=random(10);
   new c2=random(10);
   
    format(query, sizeof(query), \"INSERT INTO `vehicles` (`Model`, `sx`, `sy`, `sz`, `sa`, `fuel`, `c1`, `c2`, `health`, `owner`, `utoljara`) VALUES (%d, %f, %f, %f, %f, %d, %d, %d, %f, \'-\', \'-\')\", id, x+2, y+2, z+2, angle, TankMeret[id-400], c1, c2, 1000);
    mysql_query(query);
   
   new carid;
   
   carid = CreateVehicle(id, x+2, y+2, z+2, angle, c1, c2, 0);
   vInfo[carid][sqlid] = mysql_insert_id();
   vInfo[carid][Model] = id;
   vInfo[carid][Fuel] = TankMeret[id-400];
   vInfo[carid][xspawn] = x+2;
   vInfo[carid][yspawn] = y+2;
   vInfo[carid][zspawn] = z+2;
   vInfo[carid][anglespawn] = angle;
   vInfo[carid][Col1] = c1;
   vInfo[carid][Col1] = c2;
   vInfo[carid][health] = 1000;
   format(vInfo[carid][owner], 24, \"-\");
   format(vInfo[carid][utoljara], 24, \"-\");
   format(vInfo[carid][rendszam], 24, \"CA%dLA\", vInfo[carid][sqlid]+100);
        SetVehicleNumberPlate(carid, vInfo[carid][rendszam]);
    /*new carid;
    carid = CreateVehicle(id, x+2, y+2, z+2, angle, 0, 0, 0);
   CreateVehicleEx(carid, id, x+2, y+2, z+2, angle, 0,0);*/
   
}
else
{
    SendClientMessage(playerid, PIROS, \"Nem vagy 5*es Admin!\");
}
return 1;
}

 
 

Kocsiid bugg
« Válasz #1 Dátum: 2018. Április 09. - 21:03:45 »
0
Legyen elsődleges a jarmuid mező és nem lesz ilyen problémád.
server.redcountystories.org:7777

Nem elérhető kos

  • 292
    • Profil megtekintése
Kocsiid bugg
« Válasz #2 Dátum: 2019. Január 03. - 04:59:18 »
0
new carid;
 
ezt 4x is gondold át h mekkora hülyeség így egy globális parancsodnál

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal