23.08.2009, 15:33
I am not sure about nothing. I just did convert your command from dcmd to normal command, not changing anything else.
Here you go
command for RCON admins)
Here you go
command for RCON admins)Код:
if(strcmp(cmd, "/settime", true) == 0)
{
tmp=strtok(cmdtext, idx);
if(IsPlayerAdmin(playerid))
{
new hour;
if(sscanf(strval(tmp), "d",hour))
{
return SendClientFormatMessage(playerid,COLOR_SYSTEM,"%s: /settime [Hour]",GetLanguageString(GetPlayerLanguageID(playerid),"txt_icommands"));
}
else if(hour < 0 || hour > 23 )
{
return SendClientLanguageMessage(playerid,COLOR_RED2,"txt_worldtime1");
}
else
{
g_Time=hour;
g_TimeUpdate_Count=0;
SetWorldTime(g_Time);
CreateClientLanguageMessages("txt_worldtime2",g_Time);
SendAdminCommand(COLOR_YELLOW);
return WriteLog(clearlog,LanguageString(ServerLanguage()));
}
}
else
{
SendClientLanguageMessage(playerid,COLOR_LIGHTBLUE,"txt_error404");
}
return 1;
}

