getdate not working - 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)
+--- Thread: getdate not working (
/showthread.php?tid=367906)
getdate not working -
cssbart - 11.08.2012
for some reason my command does not give back the amount of days from start of year but the wiki says it should. wierd message comes and has some random symbols and then yourname and the command you did
Код:
if(strcmp(cmd, "/day", true) == 0 && IsPlayerConnected(playerid))
{
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminX] >= 1336)
{
new Day = getdate();
format(string,256,"%d",Day);
SendClientMessage(playerid,COLOR_WHITE,string);
}
return 1;
}
Re: getdate not working -
Youarex - 11.08.2012
Try again:
Код:
if(!strcmp(cmdtext, "/day", true))
{
if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminX] >= 1336)
{
new Day = getdate();
format(string, 3,"%d",Day);
SendClientMessage(playerid,COLOR_WHITE,string);
}
return 1;
}