Raised This Month: $ Target: $400
 0% 

Simple Error :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-29-2007 , 10:55   Re: Simple Error :(
Reply With Quote #1

Probably a little better. I don't like using set_task().

Code:
    #include <amxmodx>           #define MIN_PLAYERS 10     #define MAX_PLAYERS 32         #define LOOP_TIME 2.0                 public plugin_init()     {         register_plugin( "Waiting players", "1.0", "Amxx Community" );                 set_task( LOOP_TIME, "DisplayHUD", 0, _, _, "b" );     }             public DisplayHUD()     {         switch( get_playersnum() )         {             case 1 .. MIN_PLAYERS - 1 :             {                 set_hudmessage( 0, 255, 0, 0.1, 0.5, 0, 6.0, 5.0, 0.1, 0.1, -1 );                 show_hudmessage( 0, "! Waiting for other players..." );             }             case MIN_PLAYERS :             {                 set_hudmessage(0, 255, 0, 0.1, 0.5, 0, 6.0, 5.0, 0.1, 0.1, -1 );                 show_hudmessage( 0, "! Enough players has joined.Match started...");             }             case MIN_PLAYERS + 1 .. MAX_PLAYERS :             {                 set_hudmessage(0, 255, 0, 0.1, 0.5, 0, 6.0, 5.0, 0.1, 0.1, -1 );                 show_hudmessage( 0, "! Too many players on server...");             }             default : return;         }     }
__________________
Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-29-2007 , 11:09   Re: Simple Error :(
Reply With Quote #2

Quote:
Originally Posted by arkshine View Post
Probably a little better. I don't like using set_task().
, but you use it...
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply



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 01:18.


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