Raised This Month: $ Target: $400
 0% 

Solved dublicate respawn [ham]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-19-2017 , 09:55   dublicate respawn [ham]
Reply With Quote #1

Hi ther i have a script problem with respawn i want to protect from dublicate


when player press in RESPAWN Button in menu as it script:
PHP Code:
            menu_additem(menu"Respawn - \r6000XP"__, (!is_user_alive(id) && xp >= 6000) ? -call); 
and it function:
PHP Code:
                case 4:
                {
                    if(!
is_user_alive(id))
                    {
                        
set_pev(idpev_deadflagDEAD_RESPAWNABLE);
                        
set_task(0.2"respawn"id)
                        
                        
set_user_xp(idget_user_xp(id)-6000);
                    } 
and respawn tast function:
PHP Code:
public respawn(id) { ExecuteHamB(Ham_CS_RoundRespawnid); } 
and my problem is when press in button its dublicate respawn then get respawn as fell like round get restart as you know guy so i want protect from 2 dublicat respawn as it dont took 2 times xp only respawn 2 times in 1 secound....
__________________

Last edited by D3XT3R; 06-19-2017 at 10:28.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
 



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 23:12.


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