/o :(
#2

Quote:
Originally Posted by Luis the Lobster
Посмотреть сообщение
Okay My /o command is bugged but I cannot see anything wrong :/



pawn Код:
if (strcmp("/o", cmdtext, true, 3) == 0)
    {
        if(!strlen(cmdtext)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /o [chat]");
        new str[256];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "[OOC] %s: %s", str, cmdtext);
        SendClientMessageToAll(COLOR_GREEN, str);
        return 1;
    }
When I type /o it just does what is does in the Picture
you need strtok, which is a small snippet that will get a string/result after space example.
/o' 'message.... ' ' is the space and strtok will get the message after it.
Reply


Messages In This Thread
/o :( - by Luis- - 19.08.2010, 00:52
Re: /o :( - by Toni - 19.08.2010, 00:57
Re: /o :( - by Faith - 19.08.2010, 00:57
Re: /o :( - by Luis- - 19.08.2010, 01:04
Re: /o :( - by PotH3Ad - 19.08.2010, 01:10
Re: /o :( - by Luis- - 19.08.2010, 01:13

Forum Jump:


Users browsing this thread: 1 Guest(s)