Raised This Month: $ Target: $400
 0% 

[HELP] NAME OF THE DAY!!!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Anonyme
BANNED
Join Date: Oct 2011
Old 10-30-2011 , 13:02   [HELP] NAME OF THE DAY!!!!
Reply With Quote #1

Hello Ams !

I'm using a FFA Plugin
And i want have the Name of the day

It's working perfectly,
But after the Day Sunday finish, i don't have the day Monday again.


I use this:

Quote:
player_hudmessage(0, 5, HUD_DELAY + 1.0, {0, 0, 255}, "%L", LANG_SERVER, "FFA_STATUS_DAY", g_Days [g_FFADay])


new const g_Days[][] =

{
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"

}

public round_first()
{
g_FFADay = 0

}
I think i have to add a commande like this:

Quote:
If(g_FFADay = 7)
{
g_FFADAY = 0
}
But i don't know who i have to add this commande...

Last edited by Anonyme; 10-30-2011 at 13:03.
Anonyme is offline
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 10-31-2011 , 08:26   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #2

the week starts with sunday, you didnīt know?

Last edited by KillLikoe; 10-31-2011 at 08:27.
KillLikoe is offline
eskemo
Senior Member
Join Date: Dec 2008
Location: Australia
Old 10-31-2011 , 09:03   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #3

Quote:
Originally Posted by KillLikoe View Post
the week starts with sunday, you didnīt know?
Why troll a guy who need's help with his scripting. His asking a question and expecting a awnser. Being a smart ass about it is stupid. He most likely know's more about scripting then you so why are you in "Scripting Help" trying to troll people. Go troll people on a social networking website.

Also for your plugin, not sure and not very good at scripting but couldnt it be.

Code:
player_hudmessage(0, 5, HUD_DELAY + 1.0, {0, 0, 255}, "%L", LANG_SERVER, "FFA_STATUS_DAY", g_Days [g_FFADay])


new const g_Days[][] =  

{
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday",
"test"

}

if ( g_Days == 8)
{
        g_Days = 0
}
__________________


Free Australian FASTDL Server PM ME
eskemo is offline
KillLikoe
BANNED
Join Date: Nov 2010
Location: Paraguay
Old 10-31-2011 , 10:05   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #4

ok, sorry
KillLikoe is offline
Anonyme
BANNED
Join Date: Oct 2011
Old 10-31-2011 , 14:48   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #5

@eskemo

It's doesn't works
take this is the full code:
http://pastebin.com/raw.php?i=M8ck3LYH
Anonyme is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-31-2011 , 14:57   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #6

hes probably spanish and it starts on monday


and

http://forums.alliedmods.net/showthread.php?t=170929
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]

Last edited by enjoi.; 10-31-2011 at 14:57.
enjoi. is offline
Blue Snake.
Member
Join Date: May 2011
Location: Romania
Old 10-31-2011 , 16:07   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #7

eskemo, you can't check g_Days == 8, it's an array.

You need to add g_FFADays++ after that...or you should add here

PHP Code:
player_hudmessage(05HUD_DELAY 1.0, {00255}, "%L"LANG_SERVER"FFA_STATUS_DAY"g_Days [g_FFADay++]) 
Also, this is wrong. If you want to compare 2 integers, you use ==, not =
PHP Code:
If(g_FFADay 7
So your code should be
PHP Code:
If(g_FFADay == 7

Last edited by Blue Snake.; 10-31-2011 at 16:10.
Blue Snake. is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 10-31-2011 , 16:38   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #8

When you increment g_FFADay, if it is larger than the size you should reset it.
Code:
g_FFADay++
if ( g_FFADay >= sizeof g_Days )
     g_FFADay = 0;
Note this can also be done easily with the modulus operator:
Code:
g_FFADay = ( g_FFADay + 1 ) % sizeof g_Days;
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Anonyme
BANNED
Join Date: Oct 2011
Old 10-31-2011 , 16:54   Re: [HELP] NAME OF THE DAY!!!!
Reply With Quote #9

[quote=Emp`;1587395]
Code:
g_FFADay++
if ( g_FFADay >= sizeof g_Days )
     g_FFADay = 0;
You are my hero!

It's works 100%!

Please, can you help here now: https://forums.alliedmods.net/showthread.php?t=171028
Anonyme is offline
Reply



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 14:20.


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