Errors
#7

Try this:

pawn Код:
CMD:highlight(playerid,params[])
{
    new playername[MAX_PLAYERS];
    if(!IsCnRAdmin(playerid))
        return UnknownCMD(playerid);

    if(!strlen(params))
        return SendClientMessage(playerid, COLOR_RED, "USAGE: /highlight [PlayerID]");
   
    new string[128];
    playerid = strval(params);
    if(IsPlayerConnected(playerid) && playerid != INVALID_PLAYER_ID)
    {
        GetPlayerName(playerid, playername, sizeof(playername));
        if(AccInfo[playerid][blip] == 0)
        {
            AdminCMD(playerid, "HIGHLIGHT");
            AccInfo[playerid][pColour] = GetPlayerColor(player1);
            AccInfo[playerid][blip] = 1;
            BlipTimer[player1] = SetTimerEx("HighLight", 1000, 1, "i", player1);
            format(string,sizeof(string),"|- You have Highlighted %s's marker -|", PlayerName);
        }
        else
        {
            KillTimer( BlipTimer[playerid]);
            AccInfo[playerid][blip] = 0;
            SetPlayerColor(player1, AccInfo[player1][pColour]);
            format(string,sizeof(string),"|- You have Stopped Highlighting %s's marker -|", PlayerName);
        }
    }
    else return SendClientMessage(playerid,yellow,string);
    return 1;
}
Remember that proper indentation is key.
Reply


Messages In This Thread
Errors - by Ananisiki - 19.03.2013, 14:32
Re: Errors - by Jstylezzz - 19.03.2013, 14:33
Re: Errors - by Ananisiki - 19.03.2013, 14:34
Re: Errors - by Jstylezzz - 19.03.2013, 14:35
Re: Errors - by Ananisiki - 19.03.2013, 14:38
Re: Errors - by Jstylezzz - 19.03.2013, 14:39
Re: Errors - by Scenario - 19.03.2013, 14:44
Re: Errors - by Ananisiki - 19.03.2013, 14:58
Re: Errors - by Scenario - 19.03.2013, 15:09
Re: Errors - by Ananisiki - 19.03.2013, 15:16

Forum Jump:


Users browsing this thread: 1 Guest(s)