Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global:adminChangeMode(mode)
- {
- if(currMissionTime < 10 || missionFinished) return 0;
- missionMode = mode;
- if(mode == MISSION_MODE_IDORDER)
- {
- new lookupQuery[256];
- format(lookupQuery, 256, "SELECT * FROM `"MYSQLTABLE_MISSIONS"` WHERE `id` > %d AND `disabled` != 1", currMissionID);
- mysql_function_query(1, lookupQuery, true, "setupMissionSequence", "iiis", MISSION_MODE_IDORDER, 0, 0, "no_irc_user"); //request method = 0
- }
- if(mode == MISSION_MODE_RANDOM)
- {
- new lookupQuery[256];
- format(lookupQuery, 256, "SELECT * FROM `"MYSQLTABLE_MISSIONS"` WHERE `disabled` != 1 AND `type` != %d ORDER BY RAND() LIMIT 1", currMissionType);
- mysql_function_query(1, lookupQuery, true, "setupMissionSequence", "iiis", MISSION_MODE_RANDOM, 0, 0, "no_irc_user"); //request method = 0
- }
- if(mode == MISSION_MODE_LASTPLAYED)
- {
- new lookupQuery[256];
- format(lookupQuery, 256, "SELECT * FROM `"MYSQLTABLE_MISSIONS"` ORDER BY `lastplayed` AND `disabled` != 1 ASC LIMIT 1", 0);
- mysql_function_query(1, lookupQuery, true, "setupMissionSequence", "iiis", MISSION_MODE_LASTPLAYED, 0, 0, "no_irc_user"); //request method = 0
- }
- if(mode == MISSION_MODE_VOTE)
- {
- new missionString[128];
- format(missionString, 128, "~y~%s ~>~~g~TBA", currMissionName);
- TextDrawSetString(missionStatus, missionString);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement