[Pomoc] COS

Započeo harexew, April 27, 2017, 17:45:27 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta: Moja
Opis: Radio sam cos u mysqlu ali nece da ucita vozila (ima ukupno 3 vozila u bazi)
Kodovi:
[pawn]stock GetFreeCarID()
{
   for(new i=0;i < sizeof(CI);i++)
   {
       if(CI[c_idx]==0) return i;
   }
   return 0;
}
forward OnCarsLoad();
public OnCarsLoad()
{
   print("debug2");
   new num_rows;
   cache_get_row_count(num_rows);
   if(num_rows == 0) return 1;
   for(new i=0;i < num_rows;i++)
   {
       new id=GetFreeCarID();
       print("debug3");
       cache_get_value_name_int(i,"model",CI[id][c_model]);
       cache_get_value_name_int(i,"owner",CI[id][c_owner]);
       cache_get_value_name_int(i,"id",CI[id][c_dbid]);
       cache_get_value_name_float(i,"x",CI[id][c_x]);
       cache_get_value_name_float(i,"y",CI[id][c_y]);
       cache_get_value_name_float(i,"z",CI[id][c_z]);
       cache_get_value_name_float(i,"r",CI[id][c_r]);
       CI[id][c_idx] = CreateVehicle(CI[id][c_model],CI[id][c_x],CI[id][c_y],CI[id][c_z],CI[id][c_r],-1,-1,-1); printf("Vehicle - %i - Loaded",CI[id][c_idx]);
       print("debug4");
   }
   return 1;
}
stock LoadCOSCars()
{
   new query[128];
   format(query,sizeof(query),"SELECT * FROM cos");
   mysql_pquery(MySQL,query,"OnCarsLoad","");
   print("Debug1");
   return 1;
}
//ONgamemodeinit
LoadCOSCars();[/pawn]

koja je to verzija mysqla?

"They have computers, and they may have other weapons of mass destruction."

Plugin: R41 zadnji BlueG
Server-Version: 10.1.21-MariaDB - mariadb.org binary distribution

JA mozak stavio LoadCos cars prije mysql connect MOZAK xD... lock