Shipik, в Code
public OnGameModeInit()
всавь потом сама команда в Code
public OnPlayerCommandText
вставь
Code
if(strcmp(cmd, "/times", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,COLOR_WHITE," Использование: /times время");
}
else
{
if(strval(tmp)>24||strval(tmp)<0)
{
SendClientMessage(playerid,COLOR_WHITE," Недопустимое время.");
}
else
{
worldTime=strval(tmp);
worldTime%=24;
SetWorldTime(worldTime);
for(new tpl=0;tpl<MAX_PLAYERS;tpl++)
{
if(IsPlayerConnected(tpl)) SetPlayerTime(tpl,worldTime,minuteT);
}
}
}
return 1;
}