Raised This Month: $ Target: $400
 0% 

Help Showing a HUD and player list.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 05-29-2007 , 21:48   Help Showing a HUD and player list.
Reply With Quote #1

PHP Code:
public updateHud(id)
{
    
//if(isOfficer(id) == 0) return PLUGIN_HANDLED
    
new jaillist[2048] = "Players in jail:^n" 
    
new player_id[32], players_numplayer_name[32], jailName[64], flagtemp[128]
    
get_players(player_idplayers_num)
    for (new 
0players_numi++)
    {
        
flag getFlag(player_id[i]) 
        
get_user_name(player_id[i], player_name31)
        if(
flag 0)
        {
            
jailName jailPlace(flag)
            
format(temp,127,"%s -  %s^n",player_namejailName
            
add(jaillist,sizeof(jaillist),temp
        }
    }
    if(
strfind(jaillist,"-") == -1) {
        
add(jaillist,2047,"-  None")
    } 
    
set_hudmessage(025500.570.1206.012.0)
    
show_hudmessage(idjaillist)

    return 
PLUGIN_CONTINUE

What im attempting to do is show a player list like so.

Eathier:
Players in jail:
- none

or

Players in jail:
Peter - CELL NAME
John - CELL NAME
Bob - CELL NAME
Styles is offline
Send a message via AIM to Styles
 



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:35.


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