14.10.2018, 14:15
this is my code:
PHP код:
CMD:time(playerid,params[])
{
new input_time;
if (sscanf(params, "i", input_time))
{
return ShowPlayerDialog(playerid,DIALOG_TIME,DIALOG_STYLE_LIST,"{00FF00}Time","0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23","Ok","Cancel");
}
else
{
if(input_time > 23 || input_time < 0) return GameTextForPlayer(playerid,"~g~Time ~w~(0 - 23)",5000,3);
SetPlayerTime(playerid,input_time,0);
SendClientMessage(playerid,green,"Time changed");
time[playerid] = input_time;
}
return 1;
}