- 0
comanda /jobs
-
Similar Content
-
- 3 answers
- 949 views
-
- 4 replies
- 416 views
-
- 1 reply
- 234 views
-
- 3 replies
- 431 views
-
- 3 replies
- 432 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
testX
Problema intalnita (descriere): Salut all, am facut comanda /jobs, care imi arata numele job-ului si muncitorii, am incercat prima data sa mii arate doar pe cei online la muncitori, dar m-am gandit ca e mai bine si cei online si offline, am incercat sa fac si pentru cei offline sa mii arate dar nu imi dar corect numarul de muncitori, am facut doar ptr 1 job
EX:
am 3 conturi in baza de date, 2 dintre ele au job 1(detectiv) si unu nu are niciun job, intru in joc si imi da loc de 2 muncitori 40, 43, 48 sau 50 in loc de 2
Ero(area / rile) / warning-(ul / urile): nu imi da nici in GM, svr_log sau sql_log
Liniile de cod / sursa / script-ul(obligatoriu):
CMD:jobs(playerid, params[]) { if(IsPlayerConnected(playerid)) { new pName[MAX_PLAYER_NAME]; GetPlayerName( playerid, pName, MAX_PLAYER_NAME ); szQuery[ 0 ] = EOS; new dec, drg, arms, trk, pilx, sp, tit, fm, ctr, lwr, string[256]; foreach(Player, i) { dec = mysql_format (mysql_db, szQuery, sizeof(szQuery), "SELECT `Job` FROM `users` WHERE `users`.`Job` ='1'"); mysql_tquery(mysql_db, szQuery); if(P_DATA[i][pJob] == 2) { drg++; } if(P_DATA[i][pJob] == 3) { arms++; } if(P_DATA[i][pJob] == 4) { trk++; } if(P_DATA[i][pJob] == 5) { pilx++; } if(P_DATA[i][pJob] == 6) { sp++; } if(P_DATA[i][pJob] == 7) { tit++; } if(P_DATA[i][pJob] == 8) { fm++; } if(P_DATA[i][pJob] == 9) { ctr++; } if(P_DATA[i][pJob] == 10) { lwr++; } } format(string,sizeof(string),"Job\tMuncitori\n[1] Detectiv\t%d\n[2] Drugs Dealer\t%d\n[3] Arms Dealer\t%d\n[4] Trucker\t%d\n[5] Pilot\t%d\n[6] Spalator de strazi\t%d\n[7] Taietor de iarba\t%d\n[8] Farmer\t%d\n[9] Constructor\t%d\n[10] Lawyer\t%d", dec, drg, arms, trk, pilx, sp, tit, fm, ctr, lwr); ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_TABLIST_HEADERS, "Job-urile SERVER-ULUI", string, "Ok", ""); } return 1; }
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: da
Link to comment
Share on other sites
2 answers to this question
Recommended Posts