Raised This Month: $ Target: $400
 0% 

hudmessage display


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-21-2013 , 14:19   Re: hudmessage display
Reply With Quote #1

use a switch ;)
PHP Code:
public specdaytxtprad()
{
    
set_hudmessage(421280, -1.00.1106.03.0)
    switch(
g_SpecDay){
        case 
1ShowSyncHudMsg(0g_HudSync"Text 1")
        case 
2ShowSyncHudMsg(0g_HudSync"Text 2")
        case 
3ShowSyncHudMsg(0g_HudSync"Text 3")
        case 
4ShowSyncHudMsg(0g_HudSync"Text 4")
    }

__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 04-22-2013 at 00:37.
Leon M. is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 04-21-2013 , 15:31   Re: hudmessage display
Reply With Quote #2

Quote:
Originally Posted by Leon M. View Post
use a switch ;)
PHP Code:
public specdaytxtprad()
{
    new 
desc32 ]
    switch(
g_SpecDay){
        case 
1copy(desc31"Text 1")
        case 
2copy(desc31"Text 2")
        case 
3copy(desc31"Text 3")
        case 
4copy(desc31"Text 4")
    }
    
set_hudmessage(421280, -1.00.1106.03.0)
    
ShowSyncHudMsg(0g_HudSync"%s"desc)

Yes Leon. thats a better way.
__________________
Blizzard_87 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-21-2013 , 16:37   Re: hudmessage display
Reply With Quote #3

Quote:
Originally Posted by Leon M. View Post
use a switch ;)
PHP Code:
public specdaytxtprad()
{
    new 
desc32 ]
    switch(
g_SpecDay){
        case 
1copy(desc31"Text 1")
        case 
2copy(desc31"Text 2")
        case 
3copy(desc31"Text 3")
        case 
4copy(desc31"Text 4")
    }
    
set_hudmessage(421280, -1.00.1106.03.0)
    
ShowSyncHudMsg(0g_HudSync"%s"desc)

use 'charsmax' instead of 31

PHP Code:
case 1copy(desccharsmax(desc), "Text 1"

Last edited by EpicMonkey; 04-21-2013 at 16:39.
EpicMonkey is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 04-22-2013 , 00:34   Re: hudmessage display
Reply With Quote #4

Quote:
Originally Posted by EpicMonkey View Post
use 'charsmax' instead of 31
charsmax is an additional call, so its better to use straight away 31 if you know the array size :p

BUT you don't need to format your text, edited my example. No additional stuff, only g_SpecDay is used
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 04-22-2013 at 00:39.
Leon M. 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 10:47.


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