Raised This Month: $ Target: $400
 0% 

Keeping track of reconnecting players before map change


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lt Llama
Senior Member
Join Date: Aug 2004
Old 02-23-2006 , 10:48  
Reply With Quote #4

Code:
// Check if its the first time before a map change a player connects // and if the player has already triggered the goal. public client_authorized(id) {     new authid[32]     get_user_authid(id,authid,31)         // Loop through the array of id's     new reconnected = 0     // Check if a player who finished is coming back     for (new loopId = 1; loopId <= curId; loopId++) {         if (equali(finishContainer[loopId],authid) == 1) {             set_task(30.0, "msgToReconnect",id)             reconnected = 1             hasFinished[id] = true         }     }     if (reconnected == 0)         set_task(30.0, "msgToNewPlayer",id)     return PLUGIN_CONTINUE }

Solved

Changed the for loop. Slot 0 of finishContainer[loopId] was empty. The for loop never reached 1. Probably something I should know with arrays, but well, i learned now.
Lt Llama 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 20:26.


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