AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Code doesn't work. Please help. (https://forums.alliedmods.net/showthread.php?t=172381)

Evaldas.Grigas 11-19-2011 16:28

Code doesn't work. Please help.
 
When this was %m insted of %B it worked. If you don't know what that means look here.
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Free Hollyday VIP"
#define VERSION "1.0"
#define AUTHOR "Evaldas.Grigas"

new const hollydays[][] =
{
    
"November/19"
}

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    new 
szDate[5]
    
get_time("%B/%d"szDatecharsmax(szDate))
    for( new 
sizeofhollydays ) ; i++ )
    if( !
equal(szDatehollydays]) )
    {
        
pause("a")
    }
}

public 
client_authorizedid )
{
    
set_user_flags(id ADMIN_CHAT)
}

public 
client_putinserverid )
{
    
set_user_flags(id ADMIN_CHAT)
}

public 
client_infochangedid )
{
    
set_user_flags(id ADMIN_CHAT)



Kiske 11-19-2011 16:33

Re: Code doesn't work. Please help.
 
PHP Code:

new szDate[5

-->
PHP Code:

new szDate[32


Evaldas.Grigas 11-19-2011 16:36

Re: Code doesn't work. Please help.
 
Oh! Thanks! What a stupid mistake. :(

Sylwester 11-19-2011 19:38

Re: Code doesn't work. Please help.
 
You made even bigger mistake - your if condition with !equal is a wrong choice in this case and your plugin will not work if you add more than 1 date in hollydays array.

Evaldas.Grigas 11-20-2011 01:42

Re: Code doesn't work. Please help.
 
So, I have to do it equal?


All times are GMT -4. The time now is 08:25.

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