18.02.2010, 16:09
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
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;
}


