Jump to content

Question

Posted

Salut SA:MP.Ro.Am o problema la un fs ceas cand intru pe server ceasul apare si dispare apare si dispare dc?

[FS]:

[pawn]//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#include <a_samp>

forward clock();

#if defined FILTERSCRIPT

public OnFilterScriptInit()

{

print("\n--------------------------------------");

print(" [FS]Ceas ");

print("--------------------------------------\n");

return 1;

}

public OnFilterScriptExit()

{

return 1;

}

#else

main()

{

print("\n----------------------------------");

print(" [FS]Ceas  ");

print("----------------------------------\n");

}

#endif

public OnPlayerConnect(playerid){

clock()

;}

public clock(){

new Text:Clock;

TextDrawDestroy(Clock);

new hour,minute,second;

new string[256];

gettime(hour,minute,second);

if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}

else {format(string,25,"%d:%d",hour,minute);}

TextDrawHideForAll(Clock);

Clock = TextDrawCreate(547.0, 24.0, string);

TextDrawLetterSize(Clock, 0.6, 1.8);

TextDrawFont(Clock, 3);

TextDrawSetOutline(Clock, 2);

TextDrawShowForAll(Clock);

SetTimer("clock",1000,0);

return 1;

}[/pawn]

Vrei ceva? [email protected]

2 answers to this question

Recommended Posts

Posted

1. Trebuie un SetTimer ca sa se updateze timpul.

2. NU se sterge si dupa se readauga, folosesti http://wiki.sa-mp.com/wiki/TextDrawSetString

Banner_2.png
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.