[21:21:25] 430|200|1|0|100|0 [21:21:25] 427|500|1|10|30|0 [21:21:25] 544|1000|1|0|50|0 [21:21:25] 464|10|7|0|20|0 [21:21:25] 501|10|7|0|20|0 [21:21:25] Using existing connection! [21:21:25] Loading Cars.... [21:21:25] SQL: SELECT carid,modelid,x,y,z,o,color1,color2,respawndelay, factionid, jobid, rentprice, buyable, lockfactionid FROM cars ORDER BY carid ASC [21:21:25] 1|517|-2034|179|28|271|0|0|3600|0|0|0|0|0 |
Exception At Address: 0x7C928C0B Registers: EAX: 0x00007974 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x003A0608 ESI: 0x055334F0 EDI: 0x003A0000 EBP: 0x0012FD48 ESP: 0x0012FC8C EFLAGS: 0x00010217 Stack: +0000: 0x01159F00 0x05533510 0x00000000 0x00000000 +0010: 0x00000028 0x0012FD00 0x609C443B 0x7FFDE000 +0020: 0x0012FCE0 0x7FFDE000 0x0012FCD4 0x0000001F +0030: 0x003A41E0 0x0012FD20 0x00000001 0x80000000 +0040: 0x00000000 0x00000000 0x00000000 0x00007974 +0050: 0x055334F0 0x0012FCF4 0x609C4450 0x00037B68 +0060: 0x0012FD10 0x004ACAC8 0x00000000 0x017FA104 +0070: 0x00000000 0x0012FD60 0x609C28B8 0x0012FD20 +0080: 0x0012FD81 0x003A0000 0x055334F0 0x00000000 +0090: 0x003A41E0 0x00000000 0x00000000 0x0101FD60 +00A0: 0x00000006 0x0012FC8C 0x0012F8B0 0x0012FD80 +00B0: 0x7C90E920 0x7C910060 0x00000001 0x0012FD90 +00C0: 0x77C1C2DE 0x003A0000 0x00000000 0x05533510 +00D0: 0x01159F00 0x017FA104 0x00000000 0x003A41E0 +00E0: 0x055220A4 0x00000000 0x7FFFFFFF 0x0012FD5C +00F0: 0x0012F8B0 0x0012FE5C 0x77C25C94 0x77C02070 +0100: 0xFFFFFFFF 0x0012FDD0 0x609C161B 0x05533510 +0110: 0x03D27FA0 0x00000003 0x0036EE80 0x01159F00 +0120: 0x01159F00 0xC5073000 0x43988000 0x42080000 +0130: 0x00401096 0x00000001 0x05521FA4 0x017FA104 |
public LoadCars() { new resultline[1024]; new car[14][64]; new query[256]; ConnectToDatabase(); printf("Loading Cars...."); samp_mysql_real_escape_string("SELECT carid,modelid,x,y,z,o,color1,color2,respawndelay, factionid, jobid, rentprice, buyable, lockfactionid FROM cars ORDER BY carid ASC", query); printf(" SQL: %s",query); samp_mysql_query(query); samp_mysql_store_result(); new carid; //Load Cars while(samp_mysql_fetch_row(resultline)==1) { printf("%s", resultline); split(resultline, car, '|'); carid = AddStaticVehicleEx(strval(car[1]), floatstr(car[2]), floatstr(car[3]), floatstr(car[4]), floatstr(car[5]), strval(car[6]), strval(car[7]), strval(car[8])); VehicleInfo[carid][vSQLId] = strval(car[0]); VehicleInfo[carid][vModel] = strval(car[1]); VehicleInfo[carid][vPos_x] = floatstr(car[2]); VehicleInfo[carid][vPos_y] = floatstr(car[3]); VehicleInfo[carid][vPos_z] = floatstr(car[4]); VehicleInfo[carid][vPos_o] = floatstr(car[5]); VehicleInfo[carid][vColor1] = strval(car[6]); VehicleInfo[carid][vColor2] = strval(car[7]); VehicleInfo[carid][vRespawnDelay] = strval(car[8]); VehicleInfo[carid][vFactionId] = strval(car[9]); VehicleInfo[carid][vJobId] = strval(car[10]); VehicleInfo[carid][vRentPrice] = strval(car[11]); VehicleInfo[carid][vBuyable] = strval(car[12]); VehicleInfo[carid][vLockFactionId] = strval(car[13]); new vcmodelid = VehicleInfo[carid][vModel]-MIN_VEHICLEMODELID; VehicleInfo[carid][vFuel] = VehicleCostInfo[vcmodelid][vcMaxFuel]; VehicleInfo[carid][vOwnerId] = INVALID_PLAYER_ID; VehicleInfo[carid][vRenting] = INVALID_PLAYER_ID; if (VehicleInfo[carid][vLockFactionId] > 0) { VehicleInfo[carid][vLocked] = 1; LockFCar(carid); } } //for(new carz = 1; carz <= carid; carz++) LoadVehicleMods(carz); return 1; } |
Originally Posted by Blantas ;P*~
Here's v0.14 - http://blantas.gta-online.lt/Downloa.../sampmysql.rar
|
public LoadGroups() { new resultline[1024]; new permission[2][255]; new query[256]; ConnectToDatabase(); printf("Loading Permission Groups..."); format(query, sizeof(query), "SELECT id, name FROM groups"); printf(" SQL: %s",query); samp_mysql_query(query); samp_mysql_store_result(); new text[255]; new permissioncount; while(samp_mysql_fetch_row(resultline)==1) { printf("%s", resultline); split(resultline, permission, '|'); gGroups[permissioncount][gSQLId] = strval(permission[0]); text = unreal_escape_string(permission[1]); strmid(gGroups[permissioncount][gName],text, 0, strlen(text), 256); // LoadGroupPermissions(gGroups[permissioncount][gSQLId]); permissioncount++; } samp_mysql_free_result(); for(new i=0;i<100;i++) { if(gGroups[i][gSQLId]) { LoadGroupPermissions(gGroups[i][gSQLId]); } } return 1; } |