Raised This Month: $ Target: $400
 0% 

Transfer Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 04-21-2016 , 11:33   Transfer Menu
Reply With Quote #1

Hi guys!

I made a menu to replace the original "M" menu of counter strike 1.6, but the problem is if there's no one playing and 1 was on spectator and wants to play, he joins for example CT team with my menu but i will stay dead until someone joins the server on terrorist side or if he disconect and connect again on the server.

I tryed this was to fix it but it doesn't work because the player doesn't respawn and I don't know why, someone have another idea?

PHP Code:
for(new i33i++)  
{  
    new 
players[33], numplay
                        
    
if(cs_get_user_team(i) == CS_TEAM_CT/*this is just an example for one team, in this case for CT team*/ && is_user_alive(i))
    {
        
players[numplay++] = i
    
}
                        
    if (
numplay == 0)
    {
        
ExecuteHamB(Ham_CS_RoundRespawn,id)
        
user_silentkill(id/*this "id" is already assigned as the player who opened the menu"*/
    }

__________________

Last edited by skz; 04-21-2016 at 11:36.
skz is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 04-21-2016 , 13:58   Re: Transfer Menu
Reply With Quote #2

Replace ExecuteHamB... with this :

PHP Code:

set_pev
(idpev_deadflagDEAD_RESPAWNABLE)
dllfunc(DLLFunc_Thinkid
Not sure 100% but you may try.
And add condition to userkill:
PHP Code:
if(is_user_alive(id))
  
user_silentkill(id

Maybe the error is caused by user_silentkill code which is executed on already dead player, i dont know , just make it safe and test.

Last edited by siriusmd99; 04-21-2016 at 14:02.
siriusmd99 is offline
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 04-21-2016 , 14:43   Re: Transfer Menu
Reply With Quote #3

Quote:
Originally Posted by siriusmd99 View Post
Replace ExecuteHamB... with this :

PHP Code:

set_pev
(idpev_deadflagDEAD_RESPAWNABLE)
dllfunc(DLLFunc_Thinkid
It doesn't work either

Quote:
Originally Posted by siriusmd99 View Post
And add condition to userkill:
PHP Code:
if(is_user_alive(id))
  
user_silentkill(id

Maybe the error is caused by user_silentkill code which is executed on already dead player, i dont know , just make it safe and test.
But if the player is respawned, we don't have to verify if he is alive, right?
__________________
skz is offline
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 18:38.


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