[fixed]
#2

You were missing a brace and forgot to return a value. Follow it carefully. You would have seen it if you properly indented this.

Here you go:

pawn Код:
// skaTim [>- Name on/off
#include <a_samp>
//====================
#define COLOR_ORANGE 0xFF9900AA
//====================
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/namesoff", true) == 0)
    {
        for(new a=0; a<MAX_PLAYERS; a++)
        {
            ShowPlayerNameTagForPlayer(playerid, a, false);
        }
        SendClientMessage(playerid, COLOR_ORANGE, "You have sucessfully turned Name off. Type /nameson To Turn Them Back On!");
        return 1;
    }

    if(strcmp(cmdtext, "/nameson", true) == 0)
    {
        for(new a=0; a<MAX_PLAYERS; a++)
        {
            ShowPlayerNameTagForPlayer(playerid, a, true);
        }
        SendClientMessage(playerid, COLOR_ORANGE, "You have sucessfully turned Name on!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
[fixed] - by skaTim - 15.02.2009, 16:26
Re: /nameoff [error] - by member - 15.02.2009, 16:35
Re: /nameoff [error] - by skaTim - 15.02.2009, 17:20
Re: [fixed] - by razawork - 14.06.2010, 17:16

Forum Jump:


Users browsing this thread: 1 Guest(s)