- 0
Problema CreateDynamicCP din database
-
Similar Content
-
- 1 reply
- 147 views
-
Problema
By ImJustSlim,
- 3 answers
- 258 views
-
- 2 replies
- 141 views
-
- 1 answer
- 283 views
-
- 6 answers
- 1,122 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
FaLLenGirL
Buna tuturor. Am o mica problema cu crearea checkpoint-urilor dinamice din baza de date. Nu inteleg care e problema fiindca codul este total perfect. Problema e ca se creaza doar primul checkpoint nu si restul.
Functia:
function LoadGangHq( ) { new x_rows; cache_get_row_count( x_rows ); for( new i = 0; i < x_rows; i ++ ) { cache_get_value_float( i, "hqX", gTeamHq[ i ][ hqX ] ); cache_get_value_float( i, "hqY", gTeamHq[ i ][ hqY ] ); cache_get_value_float( i, "hqZ", gTeamHq[ i ][ hqZ ] ); gHQ[ i ] = CreateDynamicCP( gTeamHq[ i ][ hqX ], gTeamHq[ i ][ hqY ], gTeamHq[ i ][ hqZ ], 1.0, 0, 0 ); } printf( "Loaded %d headquarters.", x_rows ); return 1; }
Am aici o poza cum zice in consola ca HQ-urile (check-urile unde vor fi) s-au incarcat;
Am folosit si printf sa vad daca nu cumva se incarca doar ID "0" din DB si nu.
[03:31:03] CP: 1 | Pos1: 1159423754 | Pos2: -993160561 | Pos3: 1096891446 [03:31:03] CP: 2 | Pos1: 1150047928 | Pos2: 1143069458 | Pos3: 1116457429 [03:31:03] CP: 3 | Pos1: -989263790 | Pos2: -1019055309 | Pos3: 1111867392 [03:31:03] CP: 4 | Pos1: -989614326 | Pos2: 1155050783 | Pos3: 1108166653 [03:31:03] CP: 5 | Pos1: 1147817640 | Pos2: 1155902259 | Pos3: 1091412007 [03:31:03] CP: 6 | Pos1: 1158361498 | Pos2: -997515756 | Pos3: 1093476339 [03:31:03] CP: 7 | Pos1: 1156465213 | Pos2: 1144764891 | Pos3: 1104498708 [03:31:03] CP: 8 | Pos1: 1152777503 | Pos2: 1158306120 | Pos3: 1093689305 [03:31:03] CP: 9 | Pos1: 1152976896 | Pos2: 1148973548 | Pos3: 1093689305 [03:31:03] CP: 10 | Pos1: 1157392957 | Pos2: 1152423363 | Pos3: 1093476339 [03:31:03] CP: 11 | Pos1: -987494154 | Pos2: -996181033 | Pos3: 1088618601 [03:31:03] CP: 12 | Pos1: 1143789961 | Pos2: -995022111 | Pos3: 1096349752 [03:31:03] CP: 13 | Pos1: 1155897999 | Pos2: 1152196116 | Pos3: 1096392743 [03:31:03] CP: 14 | Pos1: -993174897 | Pos2: -992906445 | Pos3: 1088783018 [03:31:03] CP: 15 | Pos1: 1153591214 | Pos2: -992906445 | Pos3: 1099010041 [03:31:03] Loaded 15 headquarters.
Daca ma puteti ajuta as fi foarte recunoscatoare. Eu nustiu ce sa mai fac, codul e corect.
Nu am invatat azi MySQL incat sa nu stiu sa fac asa ceva, deci nu e asta problema.. problema nu poate fi decat la nativul CreateDynamicCP dar nu inteleg ce sa fie.
Daca creez checkpointurile dinamice in public "OnGameModeInit", gen:
gHq[ 0 ] = CreateDynamicCP( x, y, z, size, world, interior, .... ); gHq[ 1 ] = CreateDynamicCP( x, y, z, size, world, interior, .... ); . . . gHq[ 14 ] = CreateDynamicCP( x, y, z, size, world, interior, .... );
Se incarca perfect, acelasi lucru face si codul MySQL, dar nu inteleg de ce nu merge.
Edited by FaLLenGirLLink to comment
Share on other sites
8 answers to this question
Recommended Posts