Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OnGameModeInit:
- {
- LabelInfo[LebelCount][llabel] = CreateDynamic3DTextLabel("Tu na razie jest ściernisko!\nAle będzie san Francisco:D", -1, posX, posY, posZ + 1.5, 20.0);
- UpdateLabels();
- }
- funkcja
- stock UpdateLabels()
- {
- new str[1024],Query[512], user[32], value, Float:value2, id=1, show[64];
- for(new i;i<LebelCount;i++)
- {//przerób sobie zapytanie
- m_query("select nick,%s from "prefix"_players order by %s %s limit 10", topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][esql], topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][esql], LabelInfo[i][lsql]);
- mysql_store_result();
- format(str,sizeof str,"%s\n", topInfo[LabelInfo[i][lcat]][LabelInfo[i][ltype]][ename]);
- while(mysql_fetch_row(Query))
- {
- if(LabelInfo[i][lisFloat])
- {
- sscanf(Query,"p<|>s[32]f", user, value2);
- format(show, sizeof(show), "%.2f", value2);
- }
- else
- {
- sscanf(Query,"p<|>s[32]d", user, value);
- format(show, sizeof(show), "%d", value);
- }
- if(!strcmp(show, "0", true)) show = "--";
- format(str,sizeof(str),"%s%d{FFFFFF}. %24s %64s\n",str, id++, user, show);
- }
- format(str,sizeof(str),"%s{EAB171}Aktualizacja co godzinę!",str);
- UpdateDynamic3DTextLabelText(LabelInfo[i][llabel], -1, str);
- id=1;
- str[0] = EOS;
- user[0] = EOS;
- show[0] = EOS;
- Query[0] = EOS;
- }
- printf("labels updates");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement