Raised This Month: $ Target: $400
 0% 

Need some help with menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dasha
Senior Member
Join Date: Apr 2012
Location: \%STEAM -> $_SESSION
Old 07-06-2012 , 21:43   Need some help with menu
Reply With Quote #1

Is possible to see the hp of players in menu?
I'm talking about this:

PHP Code:
public menu(id){

    new 
menu menu_create("\wPlayers Menu""handler")
    
    new 
players[32], pnumtempid
    
new szName[32], szTempid[10]
    
get_players(playerspnum)

    for( new 
ii<pnumi++ ){
        
    
tempid players[i]

    
get_user_name(tempidszNamecharsmax(szName))
    
num_to_str(tempidszTempidcharsmax(szTempid))

    
menu_additem(menuszNameszTempid0)
    }

    
menu_display(idmenu0)
}

public 
handler(idmenuitem){

    new 
data[6], szName[64], accesscallback
    menu_item_getinfo
(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback)

    new 
tempid str_to_num(data);
    if( 
is_user_alive(tempid) ){
        
    new 
spower[32]
    
read_argv(2spower31)
    
    new 
damage str_to_num(spower)
    
user_slap(tempiddamage)
    }


What I need is this:

Player name [%s HP]
another player [%s HP]
etc [%s HP]

Every time you slap some player, in the menu the hp will refresh to see the left hp
dasha 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 15:15.


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