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

[req] hud /dhud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
chintu
Senior Member
Join Date: Jul 2013
Old 03-27-2015 , 11:39   [req] hud /dhud
Reply With Quote #1

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <colorchat>

#define PLUGIN_NAME "reset score"
#define PLUGIN_VERSION "2.1"
#define PLUGIN_AUTHOR "ChinTu"


public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_clcmd("say /rs", "reset_score")
}


public reset_score(id)
{
new name[32]
get_user_name(id, name, 32)

set_user_frags(id, 0)
cs_set_user_deaths(id, 0)

ColorChat(0, TEAM_COLOR, "^4%s ^3Has just reset his Score.", name)
return PLUGIN_HANDLED
}



can any body help me this,
i want to make mesage appear in hud/dhud is it possible ?
chintu is offline
Malli Bojan
Junior Member
Join Date: Apr 2014
Old 03-27-2015 , 12:03   Re: [req] hud /dhud
Reply With Quote #2

#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN_NAME "reset score"
#define PLUGIN_VERSION "2.1"
#define PLUGIN_AUTHOR "ChinTu"

new g_MsgSync


public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_clcmd("say /rs", "reset_score")

g_MsgSync = CreateHudSyncObj()

}


public reset_score(id)
{
new name[32]
get_user_name(id, name, 32)

set_user_frags(id, 0)
cs_set_user_deaths(id, 0)


set_hudmessage ( 0, 255, 255, -1.0, 0.08 )
ShowSyncHudMsg ( id, g_MsgSync, "%s Has just reset his Score." )

return PLUGIN_HANDLED
}

Last edited by Malli Bojan; 03-27-2015 at 12:03.
Malli Bojan is offline
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 03-27-2015 , 12:57   Re: [req] hud /dhud
Reply With Quote #3

You guys have never heard of [code] or [php] tags?

No? Use them if you're posting a code that's less than 100 lines.
Obada is offline
chintu
Senior Member
Join Date: Jul 2013
Old 03-28-2015 , 13:25   Re: [req] hud /dhud
Reply With Quote #4

Quote:
Originally Posted by Malli Bojan View Post
#include <amxmodx>
#include <cstrike>
#include <fun>

#define PLUGIN_NAME "reset score"
#define PLUGIN_VERSION "2.1"
#define PLUGIN_AUTHOR "ChinTu"

new g_MsgSync


public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

register_clcmd("say /rs", "reset_score")

g_MsgSync = CreateHudSyncObj()

}


public reset_score(id)
{
new name[32]
get_user_name(id, name, 32)

set_user_frags(id, 0)
cs_set_user_deaths(id, 0)


set_hudmessage ( 0, 255, 255, -1.0, 0.08 )
ShowSyncHudMsg ( id, g_MsgSync, "%s Has just reset his Score." )

return PLUGIN_HANDLED
}
nah this has bug :/
it reset scores but won't appear. mesage :'( fix plz... ?

Last edited by chintu; 03-28-2015 at 23:58.
chintu is offline
chintu
Senior Member
Join Date: Jul 2013
Old 03-29-2015 , 01:36   Re: [req] hud /dhud
Reply With Quote #5

i fixed it thank you )
chintu 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 13:11.


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