Raised This Month: $ Target: $400
 0% 

Player respawn event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Haircut
Member
Join Date: Mar 2004
Location: UK
Old 08-31-2004 , 12:10   Player respawn event
Reply With Quote #1

Player respawn event, I'm looking for a way to do this.

Ive tried:
Code:
    register_event("ResetHUD","re_spawn","b")
but it doesn't seem to work all the time.

Maybe I'm doing something wrong, here is the whole plug-in (v0.16):

Code:
#include <amxmodx> #include <fun> //--------------------------------------------------------------------------// public plugin_init() {     register_plugin("Spawn Protection","0.1","Haircut")     register_cvar("amx_god","1")     register_cvar("amx_godtime","5")     register_event("ResetHUD","re_spawn","b") } public client_disconnect (id) {     if (task_exists(id))         remove_task(id)     return PLUGIN_CONTINUE } //--------------------------------------------------------------------------// public re_spawn(id) {    if (!(get_cvar_num("amx_god") == 1))       return PLUGIN_CONTINUE    set_user_godmode(id, 1)        new Float:protect_time = get_cvar_float("amx_godtime")        set_hudmessage( 255, 0, 0, -1.0, 0.4, 0, 6.0, protect_time, 0.5, 1.5, 2 )    show_hudmessage(id, "SPAWN PROTECTION IS ENABLED FOR %.0f SECONDS", protect_time)        set_task(protect_time, "god_off", id)    return PLUGIN_CONTINUE } //--------------------------------------------------------------------------// public god_off(id) {     set_user_godmode(id)     return PLUGIN_CONTINUE }
__________________
MardyMouse.co.uk
MardyMouse.co.uk UK DoD Server IP: 83.142.52.21:27015
Haircut is offline
 


Thread Tools
Display Modes

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 17:17.


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