30.12.2018, 08:26
This is my code:
(240000 - (GetTickCount() - PlayerInfo[playerid][pLastPlay]) is milliseconds
How to conver it to minutes and seconds?
Код:
case 8455:
{
if (GetTickCount() - PlayerInfo[playerid][pLastPlay] >= 240000)
{
if(isnull(inputtext)) return SendClientMessage(playerid,COLOR_TOMATO,"请输入链接");
if(strlen(inputtext) > 256) return SendClientMessage(playerid,COLOR_TOMATO,"链接长度错误,最大为256");
foreach(new i : Player) PlayAudioStreamForPlayer(i, inputtext);
SendClientMessageToAll(COLOR_THISTLE, sprintf("[VIP]%s 为你点播了一首歌曲,希望你喜欢~",PlayerInfo[playerid][pName]));
PlayerInfo[playerid][pLastPlay] = GetTickCount();
}
else SendClientMessage(playerid,COLOR_TOMATO, sprintf("距离下次点播还剩 %d",(240000 - (GetTickCount() - PlayerInfo[playerid][pLastPlay])));
}
How to conver it to minutes and seconds?

