Raised This Month: $ Target: $400
 0% 

Client Connect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Rirre
Veteran Member
Join Date: Nov 2006
Old 10-07-2007 , 09:41   Client Connect
Reply With Quote #1

Problems:
----------
1. Player name (name)
it replaces it with the hostname instead and I don't know why.
hostname, mapname, nextmap, players works perfecly.

2. spk (looked into speech.ini, but it wasn't same did I get when I didn't hear
the sounds in-game, hope you have an solution to get them to work without to do them into 1 .wav file so players don't need to download)

------------
Suggestion:
I can't really make timeleft into it, wonder if you could do it (below nextmap).

Code:
#include <amxmodx>
 
public plugin_init() {
 register_plugin("AMXX Client Connect", "1.0", "Rirre")
 set_task(16.0, "ClientConnect")
 return PLUGIN_CONTINUE
}
 
public ClientConnect(id) {
    new name[32], hostname[64]
    new mapname[32], nextmap[32]
 
    get_cvar_string("hostname",hostname,63)
    get_user_name(id,name,31)
    get_mapname(mapname,31)
    get_cvar_string("amx_nextmap",nextmap,31)
 
    client_cmd(id, ^"spk \'fvox/fuzz fuzz hev_logon\'^")
    set_hudmessage(200,255,0, 0.0, 0.34, 0, 6.0, 15.0)
    show_hudmessage(id, "Hi %s!^nWelcome to %s^nMap: %s^nNextmap: %s^nPlayers: %d/%d",name,hostname,mapname,nextmap,get_playersnum(),get_maxplayers())
    return PLUGIN_CONTINUE
}
 
public plugin_precache() {
    precache_sound("fvox/fuzz.wav")
    precache_sound("fvox/hev_logon.wav")
}
Rirre is offline
 



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


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