[Ajuda] Objeto no player
#10

  • Baixe esta include: https://sampforum.blast.hk/showthread.php?tid=195439
  • Coloque isto no topo do GM:

    PHP код:
    #include <OPSP>
    new Escudo[MAX_PLAYERS]; 
  • Use este comando:

    PHP код:
    if(strcmp(cmdtext,"/escudo",true) == 0)
    {
        if(
    Escudo[playerid] == 0)
        {
            
    SetPlayerAttachedObject(playerid,1,18637,13,0.35,0.0,0.0,0.0,0.0,180.0);
            
    SetPlayerAttachedObject(playerid,2,18642,7,0.1,0.0,-0.11,0.0,-90.0,90.0);
            
    SendClientMessage(playerid0xFFFFFFFF," Vocк pegou seu escudo!");
            
    Escudo[playerid] = 1;
        }
        else
        {
            
    RemovePlayerAttachedObject(playerid1);
            
    RemovePlayerAttachedObject(playerid2);
            
    SendClientMessage(playerid0xFFFFFFFF," Vocк retirou seu escudo!");
            
    Escudo[playerid] = 0;
        }
        return 
    1;

  • Entгo crie esta callback no seu GM:

    PHP код:
    public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
    {
        if(
    Escudo[Target] == 1)
        {
            new 
    Float:vida;
            
    GetPlayerHealth(Targetvida);
            
    SetPlayerHealth(Targetvida);
            return 
    1;
        }
        return 
    1;

Reply


Messages In This Thread
[Ajuda] Objeto no player - by Joao_VS - 08.06.2011, 17:09
Re: [Ajuda] Objeto no player - by JonathanFeitosa - 08.06.2011, 17:10
Re: [Ajuda] Objeto no player - by Joao_VS - 08.06.2011, 17:15
Re: [Ajuda] Objeto no player - by Joao_VS - 08.06.2011, 17:54
Re: [Ajuda] Objeto no player - by Shadoww5 - 08.06.2011, 18:19
Re: [Ajuda] Objeto no player - by Joao_VS - 08.06.2011, 18:36
Re: [Ajuda] Objeto no player - by DreeH - 09.06.2011, 03:39
Re: [Ajuda] Objeto no player - by Joao_VS - 09.06.2011, 18:40
Re: [Ajuda] Objeto no player - by Ricop522 - 09.06.2011, 19:17
Re: [Ajuda] Objeto no player - by Shadoww5 - 09.06.2011, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)