07.04.2017, 16:58
Quote:
Your data structure (the array) is very confusing. Can you show me some more code so I can figure how the data is stored?
|
Код:
enum p_quests { questID, questTitle[64], questType, questObject[10], Timer: questTimer } new E_QUEST[MAX_QUESTS][p_quests];
And this is OnGamemodeInit:
Код:
stock OnQuestsLoad() { new x, hour; gettime(hour); x = 1; E_QUEST[x][questID] = x; format(E_QUEST[x][questTitle], 64, "The Chilliad Mystery"); E_QUEST[x][questType] = 1; if(hour >= 21 && hour <= 00) { E_QUEST[x][questObject][OBJECT_GHOST] = CreateActor(55, -2255.3076,-1749.2554,487.6301,213.9964); E_QUEST[x][questObject][OBJECT_SMOKE] = CreateDynamicObject(18735, -2255.370605, -1749.652343, 485.269836, 0.000000, 0.000000, 0.000000); } x = 2; E_QUEST[x][questID] = x; format(E_QUEST[x][questTitle], 64, "The Collector"); E_QUEST[x][questObject][OBJECT_VEHICLE] = INVALID_VEHICLE_ID; E_QUEST[x][questType] = 2; x = 3; E_QUEST[x][questID] = x; format(E_QUEST[x][questTitle], 64, "The Racer"); E_QUEST[x][questObject][OBJECT_NPC] = CreateActor(55, -2127.6614,-452.7275,35.5313,272.9914); E_QUEST[x][questType] = 3; return 1; }