Wheres the loose identations on my code?
#2

I am bad with strcmp but try this :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/me", cmdtext, true, 10) == 0)
        {
            if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "Correct usage: /me [action]"); // If the player just types /me and no action.
            {
                new str[128]; // String
                GetPlayerName(playerid, str, sizeof(str)); // Gets the player name for /me
                format(str, sizeof(str), "* %s %s", str, cmdtext[4]); // What it's going to look like.
                SendClientMessageToAll(0xFFFF00AA, str); // Color to send the message to everyone in.
            }
       
        }
        return 1;
    }
    return 0;
}
Or on top of your script you can put :
pawn Код:
#pragma tabsize 0
to hide the warning the compiler shows about loose indentation.
Reply


Messages In This Thread
Wheres the loose identations on my code? - by phil_lendon - 08.09.2012, 17:57
Re: Wheres the loose identations on my code? - by Glint - 08.09.2012, 18:13
Re: Wheres the loose identations on my code? - by nmader - 08.09.2012, 18:15
Re: Wheres the loose identations on my code? - by detter - 08.09.2012, 18:15
Re: Wheres the loose identations on my code? - by sniperwars - 08.09.2012, 19:49

Forum Jump:


Users browsing this thread: 1 Guest(s)