AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ViP Mod Issues (https://forums.alliedmods.net/showthread.php?t=108676)

Doc-Holiday 11-08-2009 03:28

ViP Mod Issues
 
Code is below

I join the server no menu then resets when player joins other team i get the menu.

on new round i get no menu

any idea why?

PHP Code:

public PlayerSpawn(id)
{
    new 
players[32], inum;
    
get_players(players,inum);
    for(new 
x=0<= inumx++)
    {
        if(
is_user_connected(players[x]) && is_user_alive(players[x]))
        {
            if(
cs_get_user_vip(players[x]))
            {
                if(
is_user_alive(players[x]) && is_user_connected(players[x]))
                {
                    
menu_display(players[x], Menu);
                    
                    
client_print(players[x], print_chat"[VIP] You are the VIP. Have fun and good luck")
                }
            }
        }
    }



Arkshine 11-08-2009 03:35

Re: Menu Issue
 
First, why do you loop though all players when the forward is called by player ?

Doc-Holiday 11-08-2009 03:38

Re: Menu Issue
 
Quote:

Originally Posted by Arkshine (Post 983838)
First, why do you loop though all players when the forward is called by player ?


Had no idea what i was doing and saw that on the wiki...

This is what i did now same thing

PHP Code:

public PlayerSpawn(id)
{    
    if(
is_user_connected(id) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
    {
        if(
cs_get_user_vip(id))
        {
            
menu_display(idMenu);
                
            
client_print(idprint_chat"[VIP] You are the VIP. Have fun and good luck")
        }
    }



Arkshine 11-08-2009 03:49

Re: Menu Issue
 
is_user_connected() is useless.

If menu doesn't appear, it means one thing, the vip is choosen after a player spawns, you should try hook round start event.

Doc-Holiday 11-08-2009 03:51

Re: Menu Issue
 
Quote:

Originally Posted by Arkshine (Post 983848)
is_user_connected() is useless.

If menu doesn't appear, it means one thing, the vip is choosen after a player spawns, you should try hook round start event.

does ham have a round start event or do i have to use reset_hud

Arkshine 11-08-2009 03:53

Re: Menu Issue
 
There is a tutorial by VEN, search please.

Doc-Holiday 11-08-2009 03:59

Re: Menu Issue
 
Quote:

Originally Posted by Arkshine (Post 983853)
There is a tutorial by VEN, search please.

Ark im not an idiot.. i know of the tuts... i know how to search... im asking if there was a more efficent way as of now... the post hasnt been modified why do you think i asked.

And the most common is reset hud for new round yet he uses hltv

Not trying to be rude just tired of comments like that... i love the help from you guys but i dont post unless i cant figure it out. so please.


Tried it on round start and i don't get any errors but i also don't get the menu at all... Round start is at the start of freeze time..... i even waited a min into the round still nothing so any other ideas.

Right now im going to test showing the menu off of a set_task of 2 seconds.

it seems the timer of 2 seconds is working.

Arkshine 11-08-2009 04:24

Re: Menu Issue
 
Quote:

Ark im not an idiot.. i know of the tuts... i know how to search... im asking if there was a more efficent way as of now... the post hasnt been modified why do you think i asked.

And the most common is reset hud for new round yet he uses hltv

Not trying to be rude just tired of comments like that... i love the help from you guys but i dont post unless i cant figure it out. so please.
You are an idiot to saying that because it you had read the tutorial you would not say "does ham have a round start event or do i have to use reset_hud" ... :roll:

Anyway, if menu doesn't work, either player is not a VIP either your menu has a problem.

Doc-Holiday 11-08-2009 04:29

Re: Menu Issue
 
Quote:

Originally Posted by Arkshine (Post 983876)
You are an idiot to saying that because it you had read the tutorial you would not say "does ham have a round start event or do i have to use reset_hud" ... :roll:

Anyway, if menu doesn't work, either player is not a VIP either your menu has a problem.


well i fixed it so w/e bro... and i have used that tut before.... and i wanted to know if anything has changed since hes posted... so w/e and RAWR


Nother issue humans vs bots

Humans = ct

Bot switches to the team and becomes vip....


All times are GMT -4. The time now is 17:42.

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