[Ajuda] ajuda colete
#4

pawn Код:
forward CheckarColete(playerid);

public OnGameModeInit()
{
    SetTimer("CheckarColete", 1000, true); // Verifica se o jogador possui colete a cada segundo.
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    RemovePlayerAttachedObject(playerid, 1);
    return 1;
}

public CheckarColete(playerid)
{
    new Float:Colete;
    GetPlayerArmour(playerid, Colete);
    if(IsACop(playerid))
    {
        if(Colete >= 1)
        {
            SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.05,0.0,0.0,0.0,0.0);
        }
        else
        {
            RemovePlayerAttachedObject(playerid, 1);
        }
    }
    return 1;
}
Fiz este sistema, teste ai

P.S: Voce deve setar o colete para o jogador, nгo para todos os jogadores conectados. Apartir do momento em que um objecto й agregado ao PLAYERID, todos os outros jogadores vгo conseguir ver esse objecto.
Reply


Messages In This Thread
ajuda colete - by FenixBorn - 20.09.2012, 15:27
Re: ajuda colete - by Petrick™ - 20.09.2012, 16:03
Re: ajuda colete - by FenixBorn - 20.09.2012, 21:01
Re: ajuda colete - by Douglas_prt - 20.09.2012, 21:08
Re: ajuda colete - by FenixBorn - 20.09.2012, 21:43
Re: ajuda colete - by YourLord - 20.09.2012, 21:55
Re: ajuda colete - by FenixBorn - 21.09.2012, 01:45
Re: ajuda colete - by rjjj - 21.09.2012, 04:38
Re: ajuda colete - by Jason` - 21.09.2012, 05:23
Re: ajuda colete - by FenixBorn - 21.09.2012, 12:57

Forum Jump:


Users browsing this thread: 2 Guest(s)