Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- (C) 2013 BY MoS CryWolf =))
- */
- #include < amxmodx >
- #pragma semicolon 1
- // Plugin information
- new const
- PLUGIN_NAME [ ] = "Show HP + VIP",
- PLUGIN_VERSION [ ] = "0.2",
- PLUGIN_AUTHOR [ ] = "CryWolf";
- new g_MsgSync, g_MaxPlayers, g_pcvarShow;
- public plugin_init ( )
- {
- register_plugin ( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
- set_task ( 3.0, "showhp", 0, _, _, "b", _ );
- // extras
- g_MaxPlayers = get_maxplayers ( );
- g_MsgSync = CreateHudSyncObj ( );
- // CvarS:
- g_pcvarShow = register_cvar ( "amx_show_health", "1" );
- }
- public showhp ( )
- {
- new id;
- for ( id = 1; id < g_MaxPlayers; id++ )
- {
- if ( !is_user_alive ( id ) || !get_pcvar_num ( g_pcvarShow ) )
- continue;
- set_hudmessage ( 127, 212, 255, 0.0, 0.90, 0, 6.0, 2.8 );
- if ( get_user_flags ( id ) == read_flags ( "o" ) ) {
- ShowSyncHudMsg ( id, g_MsgSync, "Health: %i | VIP+GM: Da", get_user_health ( id ) );
- }
- else {
- ShowSyncHudMsg ( id, g_MsgSync, "Health: %i | VIP+GM: Nu", get_user_health ( id ) );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement