Raised This Month: $ Target: $400
 0% 

show_hudmessage 5 times but bring down the variables


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-06-2007 , 22:46   show_hudmessage 5 times but bring down the variables
Reply With Quote #1

if i want to 1 hud message 5 times,:

Code:
set_task(1.0,"show_hudmessage2(0, ^"%s :   %s^", name, message[i + n])",id,"",0,"a",5)

but how do you bring down the variables thats stored in the "name" and "message[i+n]" in the called function?

Code:
What do i need to change to this:? public show_hudmessage2() {     show_hudmessage(0, "%s :   %s", name, message[i + n]) }
ask me if something is unclear
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 01-06-2007 , 23:06   Re: show_hudmessage 5 times but bring down the variables
Reply With Quote #2

I don't know exactly what you want to do, so here's an example: (untested)


Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "stupok69" #define MAX_MESSAGES 3 new message[MAX_MESSAGES][] = {     "lol this is the first message",     "rofl here's the second one",     "ok this is the last one" } new messagenum[33] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR) } public client_putinserver(id) {     messagenum[id] = 0     set_task(1.0, "hud_function", id, "", 0, "a", 3) } public hud_function(id) {     new name[32]     get_user_name(id, name, 31)         set_hudmessage(200, 100, 0, 0.0, 0.0, 0, 0.0, 2.0, 0.0, 0.0, -1)     show_hudmessage(0, "%s :   %s", name, message[messagenum[id]])         messagenum[id]++ }
stupok is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-06-2007 , 23:26   Re: show_hudmessage 5 times but bring down the variables
Reply With Quote #3

i mean the variable: name, message[] is stored in the function with the set_task, i need to transfer the variables in the function with the set_task to the function that the set_task calls
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow 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 22:29.


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