Raised This Month: $ Target: $400
 0% 

ViP Mod Issues


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-08-2009 , 03:28   ViP Mod Issues
Reply With Quote #1

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")
                }
            }
        }
    }


Last edited by Doc-Holiday; 11-08-2009 at 04:37.
Doc-Holiday is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 03:35   Re: Menu Issue
Reply With Quote #2

First, why do you loop though all players when the forward is called by player ?
__________________
Arkshine is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-08-2009 , 03:38   Re: Menu Issue
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
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")
        }
    }


Last edited by Doc-Holiday; 11-08-2009 at 03:50.
Doc-Holiday is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 03:49   Re: Menu Issue
Reply With Quote #4

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.
__________________
Arkshine is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-08-2009 , 03:51   Re: Menu Issue
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
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
Doc-Holiday is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 03:53   Re: Menu Issue
Reply With Quote #6

There is a tutorial by VEN, search please.
__________________
Arkshine is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-08-2009 , 03:59   Re: Menu Issue
Reply With Quote #7

Quote:
Originally Posted by Arkshine View Post
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.

Last edited by Doc-Holiday; 11-08-2009 at 04:20.
Doc-Holiday is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-08-2009 , 04:24   Re: Menu Issue
Reply With Quote #8

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" ...

Anyway, if menu doesn't work, either player is not a VIP either your menu has a problem.
__________________
Arkshine is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-08-2009 , 04:29   Re: Menu Issue
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
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" ...

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....

Last edited by Doc-Holiday; 11-08-2009 at 04:37.
Doc-Holiday 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 17:42.


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