[HELP] BAD CLOCK POSITION
#1

Can someone say me how could i make the clock position here:


[img width=310 height=270]http://i49.tinypic.com/fwt64h.jpg[/img]
NOW CLOCK IS OVER HERE
I WANT HIM THERE


Here is my pwn code:

Код:
#include "a_samp"
#include "time"


new Text:TextdrawName;//Name
new Text:TextdrawTime;//Time
new Time[MAX_PLAYERS];
new Name[MAX_PLAYERS];

forward Clock(playerid);//clock

public OnFilterScriptInit()
{
	TextdrawName = TextDrawCreate(495.000000,129.000000,"~b~Yourweb.com");
	TextDrawAlignment(TextdrawName,0);
	TextDrawBackgroundColor(TextdrawName,0x000000ff);
	TextDrawFont(TextdrawName,1);
	TextDrawLetterSize(TextdrawName,0.4,1.2);
	TextDrawColor(TextdrawName,0xffffffff);
	TextDrawSetOutline(TextdrawName,1);
	TextDrawSetProportional(TextdrawName,1);
	TextDrawSetShadow(TextdrawName,1);

	TextdrawTime = TextDrawCreate(503.0, 141.0,"--");
	TextDrawAlignment(TextdrawTime,0);
	TextDrawBackgroundColor(TextdrawTime,0x000000ff);
	TextDrawFont(TextdrawTime,3);
	TextDrawLetterSize(TextdrawTime,0.4, 1.05);
	TextDrawColor(TextdrawTime,0xffffffff);
	TextDrawSetOutline(TextdrawTime,1);
	TextDrawSetProportional(TextdrawTime,1);
	TextDrawSetShadow(TextdrawTime,1);
	
  	SetTimer("Clock", 1000, 1);
	return 1;
}
public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerConnect(playerid)
{
  Time[playerid] = 1;
  Name[playerid] = 1;
	return 1;
}

public OnPlayerSpawn(playerid)
{
	if (Time[playerid] == 1)
	{
		TextDrawShowForPlayer(playerid, TextdrawTime);//Time
	}
	if (Name[playerid] == 1)
	{
		TextDrawShowForPlayer(playerid, TextdrawName);//Name
	}
	return 1;
}

public Clock(playerid)
{
	new string[256];
	new hour, minute;
 	gettime(hour,minute);
  format(string, sizeof(string), "%d:%d", hour, minute);
	TextDrawSetString(Text:TextdrawTime, string);
  return 1;
}
Reply
#2

Would it be too hard to search for a released clock filterscript and take the coords from that?

http://forum.sa-mp.com/index.php?topic=131792.0

Dangg
Reply
#3

What's the problem? use a textdraw editor and create a new textdraw in your wanted position.
then replace the code that you got with the textdraw in OnGameModeInIt.
Reply
#4

Quote:
Originally Posted by BMUK
Would it be too hard to search for a released clock filterscript and take the coords from that?

http://forum.sa-mp.com/index.php?topic=131792.0

Dangg
There is no .pwn only amx


Quote:
Originally Posted by Br4veH3art
What's the problem? use a textdraw editor and create a new textdraw in your wanted position.
then replace the code that you got with the textdraw in OnGameModeInIt.
i don't know how it to get it work ;/
Reply
#5

Basic Clock v1.1
A simple clock for day and night cycles.
Source: Pastebin


Reply
#6

Quote:
Originally Posted by BMUK
Basic Clock v1.1
A simple clock for day and night cycles.
Source: Pastebin
Sorry, just have to do this :P
Reply
#7

its not fully working, when i change time, the wheater changes but in the top corner there is no clock. the corner is empty. maybe my GM have influence to it?
Reply
#8

The weather? LOL, you mean the time of day?

With regards to it not appearing, there may be a bug with other textdraws. I'm planning to fix that on next release...
Reply
#9

okay, but i think there might be problem in my GM. can you check it?

Download here
Reply
#10

I JUST updated my clock system, it will work now with your gamemode...or anyone that anyone makes for that matter...

Basic Clock v1.3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)