Raised This Month: $ Target: $400
 0% 

A little help.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
nixh
Member
Join Date: Nov 2013
Old 06-12-2014 , 16:36   A little help.
Reply With Quote #1

This message shows only for terrorists and its allright no need to change here anything.
PHP Code:
ShowSyncHudMsg(idhudhandler"Day: %d | Reason: %s"roundsreasons[userreason[id]]) 
But how to make that CT can see it too but with different text like this...
PHP Code:
ShowSyncHudMsg(idhudhandler"Day: %d"
Full code.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Jail Break: Basic Info"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

#define USERTASK 921
#define UPDATEDELAY 1.0

new static reasons[][] = {
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8."
}

new 
userreason[33]
new 
roundshudhandler

public plugin_init()
{
register_plugin(PLUGINVERSIONAUTHOR)

register_event("TextMsg","restart_roundsnum""a","2&#Game_C"/*,"2&#Game_w"*/)

register_logevent("round_end"2"1=Round_End")

RegisterHam(Ham_Spawn"player""client_spawn"1)

hudhandler CreateHudSyncObj()
}

public 
round_end()
{
rounds ++
}

public 
restart_roundsnum()
{
rounds 0
}

public 
client_disconnect(id)
{
userreason[id] = -1

if(task_exists(id USERTASK))
{
remove_task(id USERTASK)
}
}

public 
client_spawn(id)
{
if(
task_exists(id USERTASK))
{
remove_task(id USERTASK)
}

if(
get_user_team(id) == 1)
{
userreason[id] = random_num(0sizeof reasons 1)

set_task(UPDATEDELAY"client_jailinfo"id USERTASK__"b")
}
}

public 
client_jailinfo(TASKID)
{
static 
id
id 
TASKID USERTASK

set_hudmessage
(025500.80.106.012.0)

ShowSyncHudMsg(idhudhandler"Day: %d | Reason: %s"roundsreasons[userreason[id]])

EDIT: Flick3rR, a thanks man i really appreciate it and you to bat.

Last edited by YamiKaitou; 06-12-2014 at 20:01.
nixh 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 21:10.


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