Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task spawnDeer[5000]() {
- switch(deerVariables[deerState]) {
- case E_STATE_WAITING: {
- if(deerVariables[deerTime] && deerVariables[deerTime] <= gettime() && !deerVariables[deerID]) {
- deerVariables[deerState] = E_STATE_SPAWNED;
- deerVariables[deerTime] = gettime() + 1600;
- new rand = random(sizeof(deerPosition));
- new string[256];
- deerVariables[deerPosX] = deerPosition[rand][0];
- deerVariables[deerPosY] = deerPosition[rand][1];
- deerVariables[deerPosZ] = deerPosition[rand][2];
- deerVariables[deerID] = CreateDynamicObject(1247, deerVariables[deerPosX], deerVariables[deerPosY], deerVariables[deerPosZ], 0.0, 0.0, 0.0);
- GetPlayer3DZone2(deerVariables[deerPosX], deerVariables[deerPosY], deerVariables[deerPosZ], deerZone, sizeof deerZone);
- foreach(new x : Player) {
- format(string, sizeof(string), "{008080}[Treasure Hunt] {FFFFFF}Un obiect tocmai a fost spawnat pe server. Primul care il va gasi v-a primi un premiu special.", deerZone);
- SendClientMessageToAll(-1, string);
- format(string, sizeof(string), "{008080}[Treasure Hunt] {FFFFFF}Daca acesta nu va fi gasit in 30 minute, server-ul va spawna alt obiect");
- SendClientMessageToAll(-1, string);
- format(string, sizeof(string), "{FF0000}[Hint] {FFFFFF}Obiectul se afla in zona %s.", deerZone);
- SendClientMessageToAll(-1, string);
- }
- return 1;
- }
- }
- case E_STATE_SPAWNED: {
- if(deerVariables[deerTime] && deerVariables[deerTime] <= gettime()) {
- deerVariables[deerTime] = gettime() + 600;
- deerVariables[deerState] = E_STATE_WAITING;
- deerVariables[deerID] = 0;
- DestroyDynamicObject(deerVariables[deerID]);
- foreach(new x : Player) {
- SCM(x, -1, "{008080}[Treasure Info]: {FFFFFF}Nimeni nu a reusit sa gaseasca obiect-ul ascuns, server-ul va spawna alt obiect in aprox. 10 min");
- }
- return 1;
- }
- if(deerVariables[deerTime] && deerVariables[deerTime] - gettime() <= 60) {
- GetPlayer3DZone2(deerVariables[deerPosX], deerVariables[deerPosY], deerVariables[deerPosZ], deerZone, sizeof deerZone);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement