Question about nick color and login?
#1

I want to add colors for some org...

Im using LA-RP.

What i want? I want to make when someone is wanted have wl level from police, his nick to be red and on map
to can see him and i want to add FBI to be blue and on map to be blue? when they go to duty to use that color
and when warn someone add him wanted level he to get red.



And the other thing is when i connect in server to look like this ? How to make it like this?





Really i need this. Please help me!

Thanks..
Reply
#2

For your second question:

That's just few black textdraws.
Use this to make something like that. I guess you'll have to play around with that FS if you haven't used it before but it's really simple.
Reply
#3

Well, if you have a /suspect (i'm assuming you're using a godfather edit) command...

1: Create a variable
pawn Код:
new player_WantedLevel[MAX_PLAYERS] = 0;
2: Get their wanted level using GetPlayerWantedLevel and then set a variable to 1.
pawn Код:
new WantedLevel = GetPlayerWantedLevel(playerid);
if(WantedLevel == 6) return
    player_WantedLevel[playerid] = 6;
3: In OnPlayerStreamIn, set their marker color, and make it visible.
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
    if(player_WantedLevel == 6)
    {
        if(//Check if their in the FBI(?) here.)
        {
            SetPlayerMarkerForPlayer(playerid, forplayerid, 0xFF0000FF );
            printf("ID %d now sees ID %d as a red marker.");
            return 1;
        }
    }
    return 1;
}
Something along the lines of this; I'm a bit rusty in the scripting area, but this should work.
Reply
#4

Quote:
Originally Posted by Skylar Paul
Посмотреть сообщение
Well, if you have a /suspect (i'm assuming you're using a godfather edit) command...

1: Create a variable
pawn Код:
new player_WantedLevel[MAX_PLAYERS] = 0;
2: Get their wanted level using GetPlayerWantedLevel and then set a variable to 1.
pawn Код:
new WantedLevel = GetPlayerWantedLevel(playerid);
if(WantedLevel == 6) return
    player_WantedLevel[playerid] = 6;
3: In OnPlayerStreamIn, set their marker color, and make it visible.
pawn Код:
public OnPlayerStreamIn(playerid, forplayerid)
{
    if(player_WantedLevel == 6)
    {
        if(//Check if their in the FBI(?) here.)
        {
            SetPlayerMarkerForPlayer(playerid, forplayerid, 0xFF0000FF );
            printf("ID %d now sees ID %d as a red marker.");
            return 1;
        }
    }
    return 1;
}
Something along the lines of this; I'm a bit rusty in the scripting area, but this should work.
Btw im using LA-RP? Can you tell me for larp.


Suspect command:

pawn Код:
//----------------------------------[SetCrim]-----------------------------------------------
    if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 2 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 1 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pMember] == 11 || OnDuty[playerid] == 1 && PlayerInfo[playerid][pLeader] == 11) { }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Niste na duznosti!");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [opis zlocina]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (gTeam[playerid] == 2 || IsACop(playerid))
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (gTeam[giveplayerid] != 2)
                        {
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            new length = strlen(cmdtext);
                            while ((idx < length) && (cmdtext[idx] <= ' '))
                            {
                                idx++;
                            }
                            new offset = idx;
                            new result[64];
                            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                            {
                                result[idx - offset] = cmdtext[idx];
                                idx++;
                            }
                            result[idx - offset] = EOS;
                            if(!strlen(result))
                            {
                                SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/su)spect [ID Igraca/Dio Imena] [crime text]");
                                return 1;
                            }
                            if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
                            else { WantedPoints[giveplayerid]+= 2; }
                            SetPlayerCriminalEx(giveplayerid,playerid, result);
                            return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "   Ne mozete optuziti policajca !");
                        }
                    }
                }
                else
                {
                        format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
                        SendClientMessage(playerid, COLOR_GRAD1, string);
                        return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "   Niste Policajac / FBI / Swat !");
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)