GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: almasiweb - 2012. Február 15. - 14:49:07

Cím: Textdraw
Írta: almasiweb - 2012. Február 15. - 14:49:07
Üdv!
Textdraw készítõvel csináltam egyet! Sajnos csak szöveget tudtam beleírni így az lenne a kérdésem hogy hogyan lehet megcsinálni, hogy kiírja a dátumot és az idõt?
Oda a dátum szó helyire kellene
Íme a kód:
 
#include <a_samp>
new Text:Textdraw1;
public OnFilterScriptInit()
{
print(\"Textdraw Loading...\");
print(\"    textdraw betöltve\");
// Create the textdraws:
Textdraw1 = TextDrawCreate(631.000000, 430.000000, \"/info /tele /szabaly                                                      Datum:\");
TextDrawAlignment(Textdraw1, 3);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, 65535);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 0);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 0xFFFFFF00); //16777215
TextDrawTextSize(Textdraw1, 1.000000, 0.000000);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
   TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
}

 
Köszönöm elõre is!
Cím: Textdraw
Írta: 1ST_Chr - 2012. Február 15. - 15:45:32
Szia bill gates :-D
 

new str[50], ev, honap, nap, ora, perc;
getdate(ev,honap,nap);
gettime(ora,perc);
format(str,sizeof(str), \"/info /tele /szabaly Datum:%d/%d/%d  Ido:%d:%d\",ev,honap,nap,ora,perc);
Textdraw1 = TextDrawCreate(631.000000, 430.000000,str);
Cím: Textdraw
Írta: almasiweb - 2012. Február 15. - 18:30:39
Köszi mûködik, és még az idõ kellene!
 
Szia bill gates :-D 

 
Szia :D Már nem tok menekülni ez elõl a név elöl :D
Cím: Textdraw
Írta: 1ST_Chr - 2012. Február 15. - 18:44:03
Ugyanabba a textdrawba szeretnéd? A dátum után?
Mindenhol rád találok :-P
Cím: Textdraw
Írta: almasiweb - 2012. Február 15. - 18:48:29
Idézetet írta: 1ST_Chr date=1329327843\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"17082\" data-ipsquote-contentclass=\"forums_Topic
Ugyanabba a textdrawba szeretnéd? A dátum után?
Mindenhol rád találok :-P
 
jaja a dátum után :)
Hát úgynézki :D
Cím: Textdraw
Írta: 1ST_Chr - 2012. Február 15. - 18:50:57
Elsõ poszt mósosítva  ;D
Cím: Textdraw
Írta: almasiweb - 2012. Február 15. - 19:08:28
Köszönöm a segítséget!
Amúgy ez hasonlít a PHP-hoz :D
Zárom!