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

help this code in menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BackStats
Senior Member
Join Date: Oct 2008
Old 01-03-2011 , 14:16   help this code in menu
Reply With Quote #1

I have code that displays a menu of options to vote etc...
The words and color options are white, need to change the colors of the options for red, and the color of the menu title to yellow:

PHP Code:
public ShowMenuchooseplayer(idposition) {
    
// Menu stuff //
    
if (position 0) { return 0; }
    
    new 
ik
    
new MenuBody[255]
    new 
CurrentKey 0
    
new Start position 7
    
new Num
    
new UserName[32]
    
    
get_players(MenuPlayerschooseplayerNum)
    if (
Start >= Num) { Start position MenuPoschooseplayer 0; }
    new 
Len format(MenuBody255"Vote Now Players%d/%d^n^n"position+1, (Num + ((Num 7) ? )) )
    new 
End Start 7
    
new Keys = (1<<9)
    if (
End Num) { End Num; }
    
    for(
i=Start;i<End;i++) {
        
MenuPlayerschooseplayer[i]
        
get_user_name(kUserName31)
        
Keys |= (1<<CurrentKey++)
        
Len += format(MenuBody[Len], (255-Len), "%i. %s^n"CurrentKeyUserName)
    }
    if (
End != Num) {
        
format(MenuBody[Len], (255-Len), "^n9. Next^n%s"position "0. Back" "0. Exit")
        
Keys |= (1<<8)
    }
    else {
        
format(MenuBody[Len], (255-Len), "^n%s"position "0. Back" "0. Exit")
    }
    
show_menu(idKeysMenuBody, -1"chooseplayer")
    return 
0


the name of the player had been yellow %s
and options "1 YES | 2 NO" red:

PHP Code:
    }
    
voteplayer[id] = toplayer
    
new menu[256]
    new 
name[32]
    
get_user_name(toplayer,name,31)
    
format(menu,255,"Are you sure you want to vote now to player:^n%s?^nHe will have a point with your vote,^nand earned bonus^nand your bonus points will be deducted^n%s won^npoints and bonus^n^n1. YES^n2. NO^n",name,name)
    
show_menu(idKeysyousuremenu30"yousure"// Display menu
    
return PLUGIN_CONTINUE

PHP Code:
public voteplayer(id) {
    
get_user_authid(id,voteplayerids[0],31)
    
get_user_authid(votenowplayer[id],voteplayerids[1],31)
    new 
menu[256]
    new 
name1[32],name2[32]
    
get_user_name(id,name1,31)
    
get_user_name(votenowplayer[id],name2,31)
    
format(menu,255,"%s started a vote bonus player^nWant to donate bonus for %s?^nReason:^n^n%s^n^n1. Yes ^n2. No",name1,name2,voteplayerreason)
    
show_menu(0Keysallvotemenu30"allvote"// Display menu
    
voteendid id
    set_task
(30.0,"voteend",id)
    
set_task(180.0,"allowvote")
    
canvote true
    client_print
(0,print_chat,"%s started a vote bonus for %s.",name1,name2)
    
client_print(0,print_chat,"REASON: %s",voteplayerreason)
    
votenowplayer[id] = 0
    suspendvoteplayer
(voteplayerids[0],600,0)

I have read the topic new menu styles, but I can not do it in code.
If anyone knows thanks.
BackStats is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-03-2011 , 14:19   Re: help this code in menu
Reply With Quote #2

\r starts red text
\w starts white text
\d starts grey text
\y starts yellow text
__________________
fysiks is online now
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 14:16.


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