Raised This Month: $ Target: $400
 0% 

My Own Plugin from amx ;x


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
graczu
Senior Member
Join Date: Mar 2006
Old 03-25-2006 , 11:59   My Own Plugin from amx ;x
Reply With Quote #1

hi i have a question:

Code:
#include <amxmod> 

public time_status() 
{ 
  new thetime[16] 
  get_time("%H:%M",thetime,15) 
  new rs_hour[16] 
  get_cvar_string("amx_restart_hour", rs_hour, 15) 
  if(equal(thetime,rs_hour)) 
  { 
    client_print(0, print_chat, "[AMX] Automatyczne przeladowanie serwera") 
    client_print(0, print_chat, "%i Sekund do restartu", get_cvar_num("amx_restart_rtime")) 
    client_print(0, print_chat, "%i Sekund do restartu", get_cvar_num("amx_restart_rtime")) 
    client_print(0, print_chat, "%i Sekund do restartu", get_cvar_num("amx_restart_rtime")) 
    remove_task(112233) 
    set_task(get_cvar_float("amx_restart_rtime"),"hlds_quit",0) 
  } 
} 

public hlds_quit() 
{ 
  client_print(0, print_chat, "[AMX] RESTART!") 
  client_print(0, print_chat, "[AMX] RESTART!!") 
  client_print(0, print_chat, "[AMX] RESTART!!!") 
  server_cmd("quit") 
} 

public plugin_init() 
{ 
  register_plugin("Server Restart","1.0","graczu_-") 
  register_cvar("amx_restart_rtime","15") 
  register_cvar("amx_restart_hour","11:00") 
  set_task(60.0, "time_status", 112233, "", 0, "b") 
}
this my plugin, its do a restart server at 11:00, but on amxx its not work sma is compile without error's....

what is wrong here ?
graczu is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 03-25-2006 , 13:58  
Reply With Quote #2

for starters..
Code:
#include <amxmodx>
FatalisDK is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 15:26  
Reply With Quote #3

The code looks fine from what I can see. Are you sure it's even running ( do "amxx list" in the server console )?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 03-25-2006 , 15:56  
Reply With Quote #4

v3x...he has the wrong include...


i shall compile it for him.
Attached Files
File Type: sma Get Plugin or Get Source (restart.sma - 888 views - 1.4 KB)
File Type: amx restart.amx (2.2 KB, 151 views)
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
graczu
Senior Member
Join Date: Mar 2006
Old 03-25-2006 , 19:57  
Reply With Quote #5

omg what the difference with amxmod and amxmox including amxmod.inc have including: #include <amxmodx>

...

i recompile it and i will check it, but i dont see any difference............

at 11:00 i will post anserv
graczu is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 20:03  
Reply With Quote #6

You can always change to an earlier time.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
graczu
Senior Member
Join Date: Mar 2006
Old 03-26-2006 , 08:05  
Reply With Quote #7

i changed to #include <amxmodx> and ont working why i will cry
graczu is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 03-26-2006 , 12:34  
Reply With Quote #8

The amxx file SweatyBanana posted should work.
FatalisDK is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 03-26-2006 , 14:50  
Reply With Quote #9

since
Code:
register_cvar("amx_restart_rtime","15")


Code:
get_cvar_float("amx_restart_rtime")
-->
Code:
get_cvar_num("amx_restart_rtime")

don't think it would make any difference though.
[ --<-@ ] Black Rose is offline
graczu
Senior Member
Join Date: Mar 2006
Old 03-26-2006 , 21:36  
Reply With Quote #10

rotfl i cant add get_cvar_num i will have misc tag think helpppppper.... i need there float
graczu 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 16:44.


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