[Beginner] [Help] /b Command
#1

Hi guys I'm trying to create a RP script without editing another script, just creating one from scratch. A lot of work but for a beginner scripter I think it's the best way to get the basics down and become advanced.


I'm able to create a /b function shown below of my code:

pawn Код:
if(!strcmp(cmdtext, "/b", true, 2))
    {
        if(!cmdtext[2])return SendClientMessage(playerid, COLOR_GREY, "USAGE: /b [OOC CHAT]");
        new str[128];
        GetPlayerName(playerid,str, sizeof(str));
        format(str, sizeof(str), "%s ((%s))", str, cmdtext[2]);
        SendClientMessageToAll (COLOR_WHITE, str);
        return 1;
    }
Problem:

If you type something such as "/b hello" It'll appear in the chat box " ((Hello)) " obviously.

Though if you type something such as

"/boobies" ----> /boobies is NOT a registered command

It'll turn up in chat as "oobies", thinking that /b was the OOC function, and type "oobies"

How can I fix this?

Thank you!
Reply


Messages In This Thread
[Beginner] [Help] /b Command - by Crayon - 06.10.2010, 23:51
Re: [Beginner] [Help] /b Command - by LarzI - 06.10.2010, 23:59
Re: [Beginner] [Help] /b Command - by Crayon - 06.10.2010, 23:59
Re: [Beginner] [Help] /b Command - by zack3021 - 07.10.2010, 00:03
Re: [Beginner] [Help] /b Command - by LarzI - 07.10.2010, 00:11
Re: [Beginner] [Help] /b Command - by Crayon - 08.10.2010, 01:02
Re: [Beginner] [Help] /b Command - by TheHoodRat - 08.10.2010, 01:08
Re: [Beginner] [Help] /b Command - by Crayon - 08.10.2010, 01:18
Re: [Beginner] [Help] /b Command - by Crayon - 08.10.2010, 02:16
Re: [Beginner] [Help] /b Command - by TheHoodRat - 08.10.2010, 04:21

Forum Jump:


Users browsing this thread: 1 Guest(s)