Raised This Month: $ Target: $400
 0% 

get_user_name [shows server name] [help]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mAr7obg
Senior Member
Join Date: May 2007
Location: Bulgaria
Old 10-07-2009 , 13:15   Re: get_user_name [shows server name] [help]
Reply With Quote #8

Quote:
Originally Posted by Alucard^ View Post
Good but the id in the public of the DeathMsg is useless. The DeathMsg is a global event.
then how to do it without DeathMsg
Last version
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define prpsounds 2
new preplist[prpsounds][]=
{
 
"server/stayinalive"
 
"server/force"
}
public 
plugin_init() {
 
register_plugin"x-","x","x" )
 
register_event"DeathMsg",  "Event_Death",  "a" 
}
public 
Event_Death(id)  {
 
//======== •Random colors
 
new random(256)
 new 
random(256)
 new 
random(256)
 
//======== •Last player
 
new players_ct[32], players_t[32], ictite;
 
get_players(players_ct,ict,"ae","CT")   
 
get_players(players_t,ict,"ae","TERRORIST")  
 
//======== •Get players
 
new name1[32], name2[32]
 
get_user_name(players_ct[0],name1,32)
 
get_user_name(players_t[0],name2,32)
 
//======== •Random Sounds
 
new q
 q 
random_num(0,prpsounds-1)
 
//======== •Begin
 
if( ite == ) { 
  
client_cmd(0,"spk %s",preplist[q]);
  
set_hudmessage(r,g,b, -1.00.3006.06.0)
  
show_hudmessage(0"%s is alone :)"name1)
  } else if( 
ict == ) { 
  
client_cmd(0,"spk %s",preplist[q]);
  
set_hudmessage(r,g,b, -1.00.3006.06.0)
  
show_hudmessage(0"%s is alone :)"name2)
 }
 
//======== •End
}
public 
plugin_precache() {
 
precache_sound("server/stayinalive.wav")
 
precache_sound("server/force.wav")
 return 
PLUGIN_CONTINUE
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1026\\ f0\\ fs16 \n\\ par }
*/ 
mAr7obg is offline
Send a message via Skype™ to mAr7obg
 



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 22:33.


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