Command /setmytime
#1

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

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
Reply
#3

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"
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)