[FilterScript] Minimap colors
#1

Esse FilterScript tem um funcionamento bem simples


Ele detecta jogadores prуximos um do outro em um raio de 180 metros, caso algum ou mais jogadores esteja fora desse raio o mesmo serб exibido para outro jogador com um nнvel de transparкncia


Exemplo:


Sei que para alguns pode ser mais inъtil do que ъtil, mas achei isso interessante e resolvi compartilhar

pawn Код:
#include <a_samp>

new SyncTimer[MAX_PLAYERS];

public OnPlayerConnect(playerid) {
    SyncTimer[playerid] = SetTimerEx("Sync@RangeMarker", 1007, true, "i", playerid);
    return 1;
}

public OnPlayerDisconnect(playerid) {
    KillTimer(SyncTimer[playerid]);
    return 1;
}

Sync@RangeMarker(playerid); public Sync@RangeMarker(playerid) {
    for(new i; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
            new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z);

            if(IsPlayerInRangeOfPoint(i, 180.0, x, y, z))
                SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFFFF));
            else
                SetPlayerMarkerForPlayer(playerid, i, (GetPlayerColor(i) & 0xFFFFFF66));
        }
    }
    return 1;
}
Reply
#2

primeiro que vejo deste tipo seria bom em RPG
achei muito interessante

pawn Код:
MAX_PLAYERS
por

pawn Код:
static i;
    for(  i = GetMaxPlayers() - 1; i > -1; --i )
Reply
#3

Quote:
Originally Posted by Sky_.
Посмотреть сообщение
primeiro que vejo deste tipo seria bom em RPG
achei muito interessante

pawn Код:
MAX_PLAYERS
por

pawn Код:
static i;
    for(  i = GetMaxPlayers() - 1; i > -1; --i ) //by Programador_M.
Obrigado

Sobre a questгo do loop o meu MAX_PLAYERS jб estб definido em um valor baixo de qualquer forma obrigado
Reply
#4

Bem ъtil, parabйns

Reply
#5

muito legal
Reply
#6

Quote:
Originally Posted by delete
Посмотреть сообщение
Bem ъtil, parabйns

Quote:
Originally Posted by Alex_Kidds
Посмотреть сообщение
muito legal
Obrigado


No prуximo mкs estou planejando postar alguns projetos
Reply
#7

Parabens noob -q

Bem legal =)
Reply
#8

Codigp Ъtil! Porйm bom.
Reply
#9

Quote:
Originally Posted by Sky_.
Посмотреть сообщение
pawn Код:
static i;
    for(  i = GetMaxPlayers() - 1; i > -1; --i ) //by Programador_M.


Tem alguma coisa errada ai...
Reply
#10

Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
Tem alguma coisa errada ai...
:P sim eu sei o que ta errado

o criador
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)