23.08.2009, 15:18
Hey there,
I got this command but I am trying to make it a normal command, since my script doesn't like the dcmd commands :S Could someone help me please? I would appreciate the help. And of course I would like to make it so RCON admin can use it, not AdminLevel. I think that would be if(IsPlayerAdmin (playerid)) :P, but not a 100% sure. Thanks, Below I give you the code:
Thanks and Regards
Puzi
I got this command but I am trying to make it a normal command, since my script doesn't like the dcmd commands :S Could someone help me please? I would appreciate the help. And of course I would like to make it so RCON admin can use it, not AdminLevel. I think that would be if(IsPlayerAdmin (playerid)) :P, but not a 100% sure. Thanks, Below I give you the code:
Код:
dcmd_settime(playerid,params[]) { if(PlayerInfo[playerid][AdminLevel]>=g_Level[lsettime]) { new hour; if (sscanf(params, "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; }
Puzi