Raised This Month: $ Target: $400
 0% 

not removing task


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mazmaajinsh
Senior Member
Join Date: Apr 2005
Location: Latvia
Old 04-19-2012 , 07:12   not removing task
Reply With Quote #1

Hello.
Could someone solve this problem for me? Why isnt it removing task and keeps opening the menu?

Code:
public displaypos(id) {     new msg[MENU_CHARS+1], len = 0     new keys = 1023     len += formatex(msg[len], MENU_CHARS-len, (g_iMenuTeam[id] == 1) ? "\yTerrorists\w^n^n" : "\yCounter-Terrorists\w^n^n")     new i     new iPlayerID[33], iPlayerPos[33]     new myMenuTeam = g_iMenuTeam[id]         for(i = 1; i <= MaxPlayers; i++)     {         if(is_user_alive(i))         {             iPlayerPos[i] = get_nearest_marker(i)             iPlayerID[i] = i         }         else         {             iPlayerID[i] = 0         }     }         insertion_sort2(iPlayerPos,iPlayerID,MaxPlayers+1)         for(i = 0; i < MaxPlayers; i++)     {         if(iPlayerID[i])         {             new szName[32], iTeam                         get_user_name(iPlayerID[i], szName, 31)             iTeam = get_user_team(iPlayerID[i])             // CT = 2, T = 1             if(myMenuTeam == iTeam)             {                 len += formatex(msg[len], MENU_CHARS-len,"[\r%d\w] %s^n", iPlayerPos[i], szName)             }         }     }         len += formatex(msg[len], MENU_CHARS-len, (g_iMenuTeam[id] == 1) ? "^n1. Counter-Terrorists^n" : "^n1. Terrorists^n")     len += formatex(msg[len], MENU_CHARS-len, "2. Exit")     show_menu(id, keys, msg, -1, "Player positions")     set_task(1.0, "displaypos", id) } public positions(id,key) {     switch(key)     {         case 0:         {             remove_task(id)             return         }         default:         {             remove_task(id)             return         }     } } public insertion_sort2(Array1[],Array2[], length) { // Sort Array1 and Array2 by Array1     new temp1, temp2     new j     for(new i=1; i<length; i++){         j = i-1         temp1 = Array1[i]         temp2 = Array2[i]         while((j >= 0) && (temp1 > Array1[j])) // '>' is Descending, '<' is Ascending         {             Array1[j+1] = Array1[j]             Array2[j+1] = Array2[j]             j--         }         Array1[j+1] = temp1         Array2[j+1] = temp2     } }
__________________
Ahujena

Last edited by mazmaajinsh; 04-19-2012 at 07:12.
mazmaajinsh is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode