Raised This Month: $ Target: $400
 0% 

Plugin not working after restart


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 08-27-2007 , 15:15   Plugin not working after restart
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <fun> #define MAX_PLAYERS 32 new bool:g_restart_attempt[MAX_PLAYERS + 1] public plugin_init() {         register_plugin("test", "0.1", "test")     register_cvar("amx_test", "1")     register_event("ResetHUD", "event_hud_reset", "be")     register_clcmd("fullupdate", "clcmd_fullupdate")     register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")     } public clcmd_fullupdate() {     return PLUGIN_HANDLED_MAIN } public event_restart_attempt() {     new players[32], num     get_players(players, num, "a")     for (new i; i < num; ++i)         g_restart_attempt[players[i]] = true } public event_hud_reset(id) {     if (g_restart_attempt[id]) {         g_restart_attempt[id] = false         return             }         event_player_spawn(id) } public event_player_spawn(id) {     if(is_user_alive(id) && get_cvar_num("amx_test") > 0) {     set_task(0.1, "test", id)     }     } public test (id) {     strip_user_weapons(id)     give_item(id, "weapon_hegrenade") }

Compiles and works great, but if I restart the round it stops working. Why? And how do I cause amx_test 0 to restart?
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*

Last edited by mordi; 08-27-2007 at 15:19.
mordi 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 16:08.


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