Raised This Month: $ Target: $400
 0% 

[HELP] if server is empty


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xlenonz
Member
Join Date: Jun 2007
Old 01-19-2009 , 10:44   [HELP] if server is empty
Reply With Quote #1

hi,

i write small plugin but im not good that

if server is empty , change server mp_timelimit to 0.
if any user is connect or on game mp_timelimit to 40.
after if there no player on game change mp_timelimit to 0.

i write thats but , if player connect then , disconnect dont change mp_timelimit to 0

PHP Code:
#include <amxmodx>

public plugin_init()
{
   
set_task(1.0,"MyFunction"
}

public 
MyFunction()
{
server_cmd("mp_timelimit 0")
}

public 
client_putinserver(id)
{
  
server_cmd("mp_timelimit 40")
}  

public 
oyuncuvarmi()
{
new 
playernum get_playersnum()
if (
playernum 0)
{
server_cmd("mp_timelimit 40")
}
else
{
server_cmd("mp_timelimit 0")
}
set_task(30.0,"oyuncuvarmi")
return 
PLUGIN_CONTINUE

xlenonz 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 01:41.


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