Raised This Month: $ Target: $400
 0% 

What is wrong with this respawn script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
naf
Junior Member
Join Date: Aug 2010
Old 10-22-2010 , 19:45   What is wrong with this respawn script
Reply With Quote #1

So, it doesn't actually work, and i think there is something wrong with this:
Code:
    if(get_user_team(id) == 1 || get_user_team(id) == 2) {
because it doesnt even say "respawned".

Well, the code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

public plugin_init() {
    register_plugin("Respawn", "0.14b", "naf")
    
    register_event("DeathMsg","func_death","a")
}

public func_death()
    set_task(0.1, "r_spawn", read_data(2))
    
public r_spawn(id) {
    if(get_user_team(id) == 1 || get_user_team(id) == 2) {
        spawn_func(id)
    
        set_hudmessage(id, 225, 0, 0.05, 0.45, 0, 6.0, 6.0, 0.5, 0.15, 3)
        show_hudmessage(id,"[Respawned]")
        client_print(id, print_console,"Respawned.")
    }
}

public spawn_func(id) {
    new parm[1]
    parm[0] = id
    set_task(0.2,"player_spawn",72,parm,1)
    set_task(0.3,"player_spawn",72,parm,1)
    set_task(0.4,"player_giveitems",72,parm,1)
}
naf 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 10:16.


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