AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Why does this go away when nightvision active? (TimeProjector) (https://forums.alliedmods.net/showthread.php?t=86330)

crazyeffect 02-24-2009 05:57

Why does this go away when nightvision active? (TimeProjector)
 
3 Attachment(s)
This is a small plugin i made for my server, but the problem is that it goes away when the nightvision is turned on, is there any way to make it so it works with nightvision to?

(RTM = RightTopMessage)

ConnorMcLeod 02-24-2009 12:08

Re: Why does this go away when nightvision active? (TimeProjector)
 
This works fine for me :
This has nothing different from your version that would make it work with nvgs (code is better though)
PHP Code:

/* This goes away when you turn NightVision on, how can i remove it? */


#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define SITE "www.crazyeffect.net"
#define HOW_MUCH "$5"
#define HOW_LONG "Month"

new g_iTaskamx_nextmapg_iSyncHudg_iMaxPlayers

public plugin_init() 

    
register_plugin("RightTopMessage""1.0""GameFreak"

    new 
iMaxEnts global_get(glb_maxEntities)
    new 
szClassName[2]

    
g_iMaxPlayers get_maxplayers()    
    for(new 
iEnt=g_iMaxPlayers+1iEnt<iMaxEntsiEnt++)
    {
        if( 
pev_valid(iEnt) )
        {
            
pev(iEntpev_classnameszClassNamecharsmax(szClassName))
            if( !
szClassName[0] )
            {
                
g_iTask iEnt
                RegisterHamFromEntity
(Ham_Thinkg_iTask"ShowTimer"1)
                break
            }
        }
    }
    
amx_nextmap get_cvar_pointer("amx_nextmap")
    
g_iSyncHud CreateHudSyncObj()


public 
ShowTimeriEnt )
{
    if( 
iEnt != g_iTask )
    {
        return
    }

    new 
szNextMap[32], iTimeLeft get_timeleft()
    
get_pcvar_string(amx_nextmapszNextMapcharsmax(szNextMap)) 

    
set_hudmessage(2552552550.750.0500.150.300.010.02
    
ShowSyncHudMsg(0g_iSyncHud"Please visit %s^n[Admin = %s/%s]Time remaining: %d:%02d^nNext map: %s"SITEHOW_MUCHHOW_LONGiTimeLeft 60iTimeLeft 60szNextMap



crazyeffect 02-24-2009 12:36

Re: Why does this go away when nightvision active? (TimeProjector)
 
It works fantastic :D

Thanks, +k


All times are GMT -4. The time now is 17:03.

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