SA-MP Forums Archive
how do i make /settime - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how do i make /settime (/showthread.php?tid=255578)



how do i make /settime - jonnyboy - 16.05.2011

i really want to have a /settime but there is no tutorial how to make it (

can someone help me with it?
pawn Код:
SetWorldTime(11); // EXAMPLE OF A TIME



Re: how do i make /settime - Wesley221 - 16.05.2011

pawn Код:
if(!strcmp(cmdtext, "/settime 1", true, 10))
{
SetWorldTime(1);
SendClientMessage(playerid, COLOR_ORANGE, "You changed the world time to \"1\"");
return 1;
}



Re: how do i make /settime - Biesmen - 16.05.2011

pawn Код:
COMMAND:settime(playerid, params[])
{
    new time;
    if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1, "Usage: /settime [time]");
    if(time > 24 || time < 0) return SendClientMessage(playerid, -1, "Error: Invalid time!");
    SetWorldTime(time);
    return 1;
}



Re: how do i make /settime - jonnyboy - 16.05.2011

Quote:
Originally Posted by Biesmen
Посмотреть сообщение
pawn Код:
COMMAND:settime(playerid, params[])
{
    new time;
    if(sscanf(params, "i", time)) return SendClientMessage(playerid, -1, "Usage: /settime [time]");
    if(time > 24 || time < 0) return SendClientMessage(playerid, -1, "Error: Invalid time!");
    SetWorldTime(time);
    return 1;
}
sorry but i use dcmd not zcmd

edit:

i remade that to dcmd and it works