Raised This Month: $51 Target: $400
 12% 

Solved dublicate respawn [ham]


Post New Thread Reply   
 
Thread Tools Display Modes
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
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-19-2017 , 10:27   Re: dublicate respawn [ham]
Reply With Quote #2

SLOVED!
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-25-2017 , 02:15   Re: dublicate respawn [ham]
Reply With Quote #3

Quote:
Originally Posted by D3XT3R View Post
SLOVED!
Please if you solve stuff post what happened, might help others. I think removing respawnable flag would work.
eyal282 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-25-2017 , 20:06   Re: dublicate respawn [ham]
Reply With Quote #4

just removed ham becuase i using prev
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Reply



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 15:44.


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