Advertisement
Hellrocker

Untitled

Apr 17th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. global:onVoteReceive()
  2. {
  3. new rows, fields, i, data[128];
  4. cache_get_data(rows, fields);
  5. new missionVoteString[2048];
  6. if(!rows)
  7. {
  8. SendClientMessageToAll(-1, MSGPREFIX"Mission Vote: System Error");
  9. SetTimer("changeMission", 8000, 0);
  10. sysPrint(nextMissionString, "The next mission is: '%s' (%d) ", nextMissionName, nextMissionID);
  11. }
  12. while(rows)
  13. {
  14. new mVtemp[256], vmtype, vmtypestr[64];
  15. cache_get_row(i, 0, data);
  16. vmid[i] = strval(data);
  17. cache_get_row(i, 1, vmuid[i]);
  18. cache_get_row(i, 2, vmname[i]);
  19. cache_get_row(i, 4, data);
  20. vmtype = strval(data);
  21. getMissionTypeName(vmtype, vmtypestr);
  22.  
  23. format(mVtemp, 256, "%d. %s (%s)", i + 1, vmname[i], vmtypestr);
  24. strcat(missionVoteString, mVtemp);
  25. strcat(missionVoteString, "\r\n");
  26. i++;
  27. rows--;
  28. }
  29.  
  30. loop(playerid = 0, EXMPLAYERS) showDialog(playerid, 6184, DIALOG_STYLE_LIST, "Mission Vote", missionVoteString, "Vote", "Close");
  31.  
  32. SetTimer("finalizeMissionVote", 10000, 0);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement