SA-MP Forums Archive
Command /setmytime - 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)
+--- Thread: Command /setmytime (/showthread.php?tid=419282)



Command /setmytime - toi - 28.02.2013

can you tell me how to create the / setmytime [hour] on strcmp?
thanks


Re: Command /setmytime - Gamer_007 - 28.02.2013

pawn Код:
if (strcmp("/setmytime", cmdtext, true) == 0) {
        if(!strlen(params)) return SendClientMessage(playerid, red, "USAGE: /setmytime [hour]");
        new time = strval(params), string[128];
        format(string,sizeof(string),"You have set your time to %d:00", time); SendClientMessage(playerid,blue,string);
        SetPlayerTime(playerid, time, 0);
                return 1;
}
convert it to strcmp :P


Re: Command /setmytime - toi - 28.02.2013

4 error
Код:
C:\Users\----\Desktop\GM NEW\gamemodes\TTS.pwn(1635) : error 017: undefined symbol "params"
C:\Users\----\Desktop\GM NEW\gamemodes\TTS.pwn(1635) : error 017: undefined symbol "red"
C:\Users\----\Desktop\GM NEW\gamemodes\TTS.pwn(1636) : error 017: undefined symbol "params"
C:\Users\----\Desktop\GM NEW\gamemodes\TTS.pwn(1637) : error 017: undefined symbol "blue"



Re: Command /setmytime - Denying - 28.02.2013

He told you to convert it to strcmp... Just convert it, it is quite easy if you know how to use: https://sampwiki.blast.hk/wiki/Strtok