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

I am looking for an event :) (player finished loading?)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sake
Senior Member
Join Date: Jul 2011
Old 07-12-2011 , 14:59   I am looking for an event :) (player finished loading?)
Reply With Quote #1

Hello there,

I've been searching for hours now, but I don't get it. Is there an event I can use in order to distinguish if a player is done loading the game (-> Spec-Mode)? I've already seen a (not so satisfying) event (via HamSandwich) by which I can listen for round-restarting. But that's not what I want.

Can you help me? Thanks in advance!

sake
sake is offline
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 07-12-2011 , 15:31   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #2

MOTD maybe?
01101101 is offline
sake
Senior Member
Join Date: Jul 2011
Old 07-12-2011 , 15:57   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #3

Found another solution. Sound after first respawn with short delay. But thanks anyways.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#define VERSION "1.0"

new names[32][18]

public 
plugin_init()
{
    
register_plugin("chi"VERSION"sake")
    
register_event("ResetHUD""greetings""be")
}

public 
greetings(id)
{
    new 
name[18
    
get_user_name(idname17)
    for(new 
031i++)
    {
        if(
strcmp(name,names[i],18) == 0)
        {
            return 
PLUGIN_CONTINUE
        
}
    }
    
set_task(0.2"dummy"id)
    if(
strcmp(name,"C.h.i",5) == 0)
    {
        
names[id] = "C.h.i"
        
client_cmd(0"spk jnr/chi.wav")
        
show_hudmessage(0,"Hallo, ich bin der C.h.i vom Teamspeak!")
    }
    else
    {
        
names[id] = name
        
new message[] = "Welcome on the Server, "
        
strcat(message,name,100)
        
strcat(message,"! Play fair!",112)
        
show_hudmessage(0,message)
    }
    return 
PLUGIN_CONTINUE
}

public 
client_disconnect(id)
{
    
names[id] = ""
    
return PLUGIN_CONTINUE
}

public 
dummy(id)
{
    return 
PLUGIN_CONTINUE

sake is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-12-2011 , 17:23   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #4

client_putinserver() ? It triggers right after player finished loading.
__________________
Hunter-Digital is offline
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 07-12-2011 , 17:52   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #5

client_putinserver(), client_connect(), or even client_authorized() should be what you want. Else, you could use the message TeamInfo, which is when a team is chosen. There's also ShowMenu and VGUIMenu which are the actual displaying of the menus for choosing a team.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
sake
Senior Member
Join Date: Jul 2011
Old 07-12-2011 , 18:13   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #6

I've tried client_connect and putinserver and they didn't work.

How do I have to subscribe to the others? (register_event)?
sake is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-12-2011 , 18:26   Re: I am looking for an event :) (player finished loading?)
Reply With Quote #7

Quote:
Originally Posted by sake View Post
I've tried client_connect and putinserver and they didn't work.

How do I have to subscribe to the others? (register_event)?
Explain what you are trying to do in detail.
__________________
fysiks 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 10:54.


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