AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]Respawn Bug (https://forums.alliedmods.net/showthread.php?t=109164)

#8 SickneSS 11-13-2009 18:46

[SOLVED]Respawn Bug
 
Request...

Quote:

Originally Posted by joropito (Post 988909)
There's a bug

If someone dies and disconnects before respawn, you get in console an error because user is inexistent.

The task respawn should be removed when someone disconnects.

Bug...

Code:

Dropped Sickness from server
Reason:  Client sent 'drop'
L 11/13/2009 - 20:22:03: [CSTRIKE] Invalid player 1
L 11/13/2009 - 20:22:03: [AMXX] Displaying debug trace (plugin "WarmUP_Mod.amxx")
L 11/13/2009 - 20:22:03: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 11/13/2009 - 20:22:03: [AMXX] [0] WarmUP_Mod.sma::cmdRespawns (line 252)

Line...

PHP Code:

    if(!valids_teams(id)) { 

Complete Code Here

Try it in many ways to no avail :/...

Like...

PHP Code:

cmdRespawns(id) {

        if(!
is_user_connected(id))
        
remove_task(id+TASK_RESPAWN)

        
//Code


and...

PHP Code:

if(is_user_connected(id))
set_task(get_pcvar_float(respawndelay),"cmdRespawns",id+TASK_RESPAWN

and the problem continues,so i request help here.

Thanks!

Arkshine 11-13-2009 18:49

Re: Respawn Bug
 
The task is not removed on player disconnect ?

#8 SickneSS 11-13-2009 18:53

Re: Respawn Bug
 
Quote:

Originally Posted by Arkshine (Post 989304)
The task is not removed on player disconnect ?

maybe u want kill me,but I realized that after making this post :P...

Solved and Sorry

I make this...

PHP Code:

public client_disconnect(id) {   
    
    
respawn[id] = false
    b_attack
[id] = false
    remove_task
(id+TASK_RESPAWN)



Arkshine 11-13-2009 19:37

Re: [SOLVED]Respawn Bug
 
Yes, it's right. ;)


All times are GMT -4. The time now is 13:43.

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