highlight
#1

Hello
i want /highlight command for normal players,
they can highlight themself but not others
this is the code
pawn Код:
CMD:highlight(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid)) {
        if(isnull(params)) return SendClientMessage(playerid, LIGHTBLUE2, "Usage: /highlight [PlayerID]") &&
        SendClientMessage(playerid, orange, "Function: Will Highlight the specified player! (Blinking)");
        new player1, playername[MAX_PLAYER_NAME], string[128];
        player1 = strval(params);
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
            GetPlayerName(player1, playername, sizeof(playername));
            if(PlayerInfo[player1][blip] == 0) {
                CMDMessageToAdmins(playerid,"HighLight");
                PlayerInfo[player1][pColour] = GetPlayerColor(player1);
                PlayerInfo[player1][blip] = 1;
                BlipTimer[player1] = SetTimerEx("HighLight", 1000, 1, "i", player1);
                format(string,sizeof(string),"|- You have highlighted %s's marker -|", playername);
            } else {
                KillTimer( BlipTimer[player1] );
                PlayerInfo[player1][blip] = 0;
                SetPlayerColor(player1, PlayerInfo[player1][pColour] );
                format(string,sizeof(string),"You have stopped highlighting %s's marker", playername);}
            return SendClientMessage(playerid,blue,string);
        } else return SendClientMessage(playerid, red, "Player is not connected");
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");}
Reply
#2

help plz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)