verteich
Умник
Как сделать чтобы тут писало played: сколько отыграл за час
PHP:
CMD:time(playerid, params[])
{
new string[200];
if(CreateMats[playerid]==4 || CreateMats[playerid]==3) return 1;
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,0,0,1);
format(string, sizeof(string), "%s взглянул(a) на часы", PN(playerid));
SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 10.0, 5000);
new mtext[20];
new year, month,day;
getdate(year, month, day);
switch(month)
{
case 1:mtext = "January";
case 2: mtext = "February";
case 3: mtext = "March";
case 4: mtext = "April";
case 5:mtext = "Maya";
case 6: mtext = "June";
case 7: mtext = "in July";
case 8: mtext = "August";
case 9: mtext = "Sentebrya";
case 10:mtext = "October";
case 11: mtext = "November";
case 12: mtext = "December";
}
new hour,minuite,second;
gettime(hour,minuite,second);
if (minuite < 10)
{
if (PlayerInfo[playerid][pJailTime] > 0)format(string, sizeof(string), "~y~%d ~y~%s~n~~w~%d:0%d~n~ ~g~ concluded ~w~%d", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
else format(string, sizeof(string), "~y~%d ~y~%s~n~~w~%d:0%d", day, mtext, hour, minuite);
}
else
{
if (PlayerInfo[playerid][pJailTime] > 0) format(string, sizeof(string), "~y~%d ~y~%s~n~~w~%d:%d~n~ ~g~ concluded ~w~%d", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
else format(string, sizeof(string), "~y~%d ~y~%s~n~~w~%d:%d", day, mtext, hour, minuite);
}
GameTextForPlayer(playerid, string, 4000, 1);
return true;
}
