SA-MP Forums Archive
What's wrong? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong? (/showthread.php?tid=69575)



What's wrong? - Slim888 - 19.03.2009

Hello, Sorry for my bad English but I have a problem with the days of the week. Textdraw remains only on Wednesday (St).
I am a beginner in the Pawn. Thank you for your help Here is the code

Код:
den=TextDrawCreate(509.0, 8.0, "~g~Po ~g~Ut ~r~St ~g~Ct ~g~Pt ~g~So ~g~Ne");
TextDrawLetterSize(den, 0.3, 1.4);
TextDrawFont(den, 3);
TextDrawSetOutline(den, 1);
Код:
public denfunkce()
{
new string[256];
new day;
getdate(day);
switch(day)
   {
      case 0: format(string,25,"~g~Po ~g~Ut ~r~St ~g~Ct ~g~Pt ~g~So ~g~Ne",day);
      case 1: format(string,25,"~g~Po ~g~Ut ~g~St ~r~Ct ~g~Pt ~g~So ~g~Ne",day);
      case 2: format(string,25,"~g~Po ~g~Ut ~g~St ~g~Ct ~r~Pt ~g~So ~g~Ne",day);
      case 3: format(string,25,"~g~Po ~g~Ut ~g~St ~g~Ct ~g~Pt ~r~So ~g~Ne",day);
      case 4: format(string,25,"~g~Po ~g~Ut ~g~St ~g~Ct ~g~Pt ~g~So ~r~Ne",day);
      case 5: format(string,25,"~r~Po ~g~Ut ~g~St ~g~Ct ~g~Pt ~g~So ~g~Ne",day);
      case 6: format(string,25,"~g~Po ~r~Ut ~g~St ~g~Ct ~g~Pt ~g~So ~g~Ne",day);

   }
for(new i=0;i<MAX_PLAYERS;i++)
{
TextDrawHideForPlayer(i,den);
TextDrawSetString(den,string);
TextDrawShowForPlayer(i,den);
}
return 1;
}
No errors in the pawn.



Re: What's wrong? - Vince - 19.03.2009

Don't know if this is the problem, but check out this:

https://sampwiki.blast.hk/wiki/Getdate


Re: What's wrong? - Slim888 - 19.03.2009

ok thx for reply