#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; }
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 |
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. |
Originally Posted by BMUK
|