Raised This Month: $ Target: $400
 0% 

[Resolved] Code works on random players only?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-30-2006 , 10:34   [Resolved] Code works on random players only?
Reply With Quote #1

Hey again everyone, another problem @_@. The code i'm about to post below will only work on some players. It is supposed to work for everyone that touches it.

Code:
public toucherStartFunc(pToucher, pTouched) {     new id = pTouched;     if(!timerUse[id]) {         client_cmd(id, "speak fvox/boop");         hour[id] = 0.0;         minute[id] = 0.0;         second[id] = 1.0;         set_hudmessage(200, 100, 0, -1.0, -5.0, 0, 0.0, 500000.9, 0.0, 0.0, 4);         show_hudmessage(id, "00:00:01");         set_task(1.0, "timerCount", 1, "", 0, "b");     }     timerUse[id] = true;         return PLUGIN_CONTINUE; } public timerCount(id) {     second[id] += 1.0         if(second[id] == 60.0) {         second[id] = 0.0         minute[id] += 1.0     }         if(minute[id] == 60.0) {         minute[id] = 0.0         hour[id] += 1.0     }         new strHour[3];     new strMinute[3];     new strSecond[3];         float_to_str(hour[id], strHour, 2);     float_to_str(minute[id], strMinute, 2);     float_to_str(second[id], strSecond, 2);         switch(hour[id]) {         case 0.0: strHour = "00";         case 1.0: strHour = "01";         case 2.0: strHour = "02";         case 3.0: strHour = "03";         case 4.0: strHour = "04";         case 5.0: strHour = "05";         case 6.0: strHour = "06";         case 7.0: strHour = "07";         case 8.0: strHour = "08";         case 9.0: strHour = "09";     }         switch(minute[id]) {         case 0.0: strMinute = "00";         case 1.0: strMinute = "01";         case 2.0: strMinute = "02";         case 3.0: strMinute = "03";         case 4.0: strMinute = "04";         case 5.0: strMinute = "05";         case 6.0: strMinute = "06";         case 7.0: strMinute = "07";         case 8.0: strMinute = "08";         case 9.0: strMinute = "09";     }         switch(second[id]) {         case 0.0: strSecond = "00";         case 1.0: strSecond = "01";         case 2.0: strSecond = "02";         case 3.0: strSecond = "03";         case 4.0: strSecond = "04";         case 5.0: strSecond = "05";         case 6.0: strSecond = "06";         case 7.0: strSecond = "07";         case 8.0: strSecond = "08";         case 9.0: strSecond = "09";     }         set_hudmessage(200, 100, 0, -1.0, -5.0, 0, 0.0, 500000.9, 0.0, 0.0, 4);     show_hudmessage(id, "%s:%s:%s", strHour, strMinute, strSecond);         return PLUGIN_CONTINUE; }

Please help me fix this

Last edited by hlstriker; 11-30-2006 at 12:42. Reason: Resolved
hlstriker 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:01.


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