SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 30/04/2011, 01:33 PM   #1
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,745
Reputation: 198
Post Gameday

Heey guys
I have made gameday and time but how can i let see the day in textdraw.
Code:
Code:
public TimeWorld()
{
	new string[30];
	if(gametime == 0 && gameday == 7 && gameweek == 4)
	{
	     //SendRconCommand("gmx");
	}
	gametime++;
	if(gametime >= 24)
	{
		gametime =0;
	}
	if(gametime == 0)
	{
		gameday ++;
	}
	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if (IsPlayerConnected(i))
	    {
        	SetPlayerTime(i,gametime,0);
		}
	}
	SetWorldTime(gametime);
	format(string, sizeof(string), "[GAME TIME] %d:00", gametime);
	SendClientMessageToAll(COLOR_WHITE, string);
	if(gametime == 0 && gameday == 1)
	{

		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Monday");
	}
	if(gametime == 0 && gameday == 2)
	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Tuesday");
	}
	if(gametime == 0 && gameday == 3)
	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Wednesday");
	}
	if(gametime == 0 && gameday == 4)
	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Thursday");
	}
	if(gametime == 0 && gameday == 5)
	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Friday");
	}
	if(gametime == 0 && gameday == 6)
	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Saturday");
	}
	if(gametime == 0 && gameday == 7)
 	{
		SendClientMessageToAll(COLOR_WHITE,"[GAME DAY] Sunday");
	}
	if(gametime == 23 && gameday == 7)
	{
		gameweek ++;
		gameday =1;
		if(gameweek == 1)
		{
			SendClientMessageToAll(COLOR_WHITE,"[GAME WEEK] 1");
		}
		if(gameweek == 2)
		{
			SendClientMessageToAll(COLOR_WHITE,"[GAME WEEK] 2");
		}
		if(gameweek == 3)
		{
			SendClientMessageToAll(COLOR_WHITE,"[GAME WEEK] 3");
		}
		if(gameweek == 4)
		{
			SendClientMessageToAll(COLOR_WHITE,"[GAME WEEK] 4");
		}
	}
	if(gametime == 23 && gameday == 7 && gameweek == 4)
	{
		//SendClientMessageToAll(COLOR_ADMIN,"[AUTO ADMIN] The server will restart in one game hour to give it a nice fresh start.");
	}
}
thanks Admigo
__________________
0.4a RC. We are waiting for you

Admigo is offline  
Old 30/04/2011, 01:39 PM   #2
Phanto90
Huge Clucker
 
Phanto90's Avatar
 
Join Date: Mar 2011
Location: Milan, Italy
Posts: 352
Reputation: 31
Default Re: Gameday

If you do that i think that you could also do it with textdraw. No difference, the string is a string..

TextDrawCreate
__________________


Latest Releases
FilterscriptsIncludesMaps
PRaceSystem v1.3 PBlock v1.1Electronic Shop
PVotekick v1.1PInventory v1.1
________________________
I don't script for money, stop asking for it.

Phanto90 is offline  
Old 30/04/2011, 01:45 PM   #3
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,745
Reputation: 198
Default Re: Gameday

Quote:
Originally Posted by Phanto90 View Post
If you do that i think that you could also do it with textdraw. No difference, the string is a string..

TextDrawCreate
I dont know how to do this. Pls help
__________________
0.4a RC. We are waiting for you

Admigo is offline  
Old 30/04/2011, 01:48 PM   #4
Phanto90
Huge Clucker
 
Phanto90's Avatar
 
Join Date: Mar 2011
Location: Milan, Italy
Posts: 352
Reputation: 31
Default Re: Gameday

Sure that you did that code :/ Suspicious

http://wiki.sa-mp.com/wiki/TextDrawCreate
__________________


Latest Releases
FilterscriptsIncludesMaps
PRaceSystem v1.3 PBlock v1.1Electronic Shop
PVotekick v1.1PInventory v1.1
________________________
I don't script for money, stop asking for it.

Phanto90 is offline  
Old 30/04/2011, 02:05 PM   #5
Admigo
High-roller
 
Admigo's Avatar
 
Join Date: Oct 2010
Location: The Netherlands
Posts: 1,745
Reputation: 198
Default Re: Gameday

I know how to create textdraw but how can i change it on day
__________________
0.4a RC. We are waiting for you

Admigo is offline  
 

Thread Tools
Display Modes

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



All times are GMT. The time now is 01:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.