[Ajuda] Armas no corpo!
#1

O que estб errado aqui?

Код:
//Esse e o meu codigo que eu editei
public ChecarArma(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerWeapon(i) == 356) // SUBSTITUA O ARMA X PELO ID DA ARMA
        {
SetPlayerAttachedObject(playerid, 356, 1, 0.345200, -0.124600, 0.111000, 0.000000, 161.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
            //SUBSTITUA O SLOT PELO SLOT QUE SERБ USADO PELO OBJETO
            //MODELO = MODELO DO OBJETO QUE VOCК QUER COLOCAR NO JOGADOR. VEJA AQUI: https://sampwiki.blast.hk/wiki/Objectsnl...3.10869936            //OSSO = O OSSO ONDE O OBJETO SERБ COLOCADO. VEJA AQUI: https://sampwiki.blast.hk/wiki/Bone_IDsn...3.10869936            return 1;
        }
    }
    return 1;
}
Код:
//Esse e o codigo que me foi passado
forward ChecarArma(playerid);

public OnGameModeInit()
{
    SetTimer("ChecarArma",500,true); // IRБ CHECAR A CADA 0,5 SEGUNDO A PUBLIC ABAIXO. ADICIONE ESTA LINHA A ESTA PUBLIC
    return 1;
}
public ChecarArma(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerWeapon(i) == ArmaX) // SUBSTITUA O ARMA X PELO ID DA ARMA
        {
            SetPlayerAttachedObject(playerid, SLOT, MODELO, OSSO); 
            //SUBSTITUA O SLOT PELO SLOT QUE SERБ USADO PELO OBJETO
            //MODELO = MODELO DO OBJETO QUE VOCК QUER COLOCAR NO JOGADOR. VEJA AQUI: https://sampwiki.blast.hk/wiki/Objectsnl...3.10869936            //OSSO = O OSSO ONDE O OBJETO SERБ COLOCADO. VEJA AQUI: https://sampwiki.blast.hk/wiki/Bone_IDs    
            return 1;
        }
    }
    return 1;
}
Reply
#2

Estб dando algum erro/warning/o code nгo estб funfando?

.-.
Exprica зaporradireito.
Reply
#3

Substitua o

pawn Код:
if(GetPlayerWeapon(i) == ArmaX)
Pelo ID Da Arma
Reply
#4

mas eu ja editei tudo tipo nao da error e que quando eu carrego e entro no server a m4 nao fica nas costas pqpq?
Reply
#5

Sera que o erro esta aqui?
Код:
SetPlayerAttachedObject(playerid, 356, 1, 0.345200, -0.124600, 0.111000, 0.000000, 161.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
Reply
#6

Acredito que o ID da arma esteja errado.
356 ? Lol
Reply
#7

LOL mesmo nao tem esse id de arma vc deve ser q coloco quantidade de municao ai kkkk

segue o link aki tem os id das armas >> https://sampwiki.blast.hk/wiki/Weapons


@EDIT

eu verificando seu erro percebi o q vc fez vc coloco o modelo da arma e e pra vc colocar o id q e o correto

ASSIM \/

Reply
#8

ue quando eu usei o programa eu criei umas armas e aqui estao elas ne

Код:
SetPlayerAttachedObject( playerid, 0, 356, 1, 0.345200, -0.124600, 0.111000, 0.000000, 161.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // m4 - 
SetPlayerAttachedObject( playerid, 0, 356, 1, 0.345200, -0.124600, 0.111000, 0.000000, 161.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // m4 - m4
SetPlayerAttachedObject( playerid, 0, 348, 1, -0.100000, 0.000000, 0.153999, 80.000000, 175.000000, 10.000000, 1.000000, 1.000000, 1.000000 ); // desert_eagle - 
SetPlayerAttachedObject( playerid, 0, 348, 1, -0.100000, 0.000000, 0.153999, 80.000000, 175.000000, 10.000000, 1.000000, 1.000000, 1.000000 ); // desert_eagle - 348
SetPlayerAttachedObject( playerid, 0, 353, 1, 0.019999, -0.119999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // mp5lng - 348
SetPlayerAttachedObject( playerid, 0, 353, 1, 0.019999, -0.119999, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // mp5lng - 353
SetPlayerAttachedObject( playerid, 0, 351, 1, 0.509999, -0.140000, 0.146999, 0.000000, 175.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // shotgspa - 
SetPlayerAttachedObject( playerid, 0, 351, 1, 0.509999, -0.140000, 0.146999, 0.000000, 175.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // shotgspa - 351
SetPlayerAttachedObject( playerid, 0, 355, 1, 0.400000, -0.140000, 0.100000, 0.000000, 175.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // ak47 - 
SetPlayerAttachedObject( playerid, 0, 355, 1, 0.400000, -0.140000, 0.100000, 0.000000, 175.000000, 0.000000, 1.000000, 1.000000, 1.000000 ); // ak47 - 355
Reply
#9

olha meu post d cima eu editei e confere nos link as armas q vc quer
Reply
#10

entao ficaria assim?

Код:
public ChecarArma(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(GetPlayerWeapon(i) == 31) // SUBSTITUA O ARMA X PELO ID DA ARMA
        {
SetPlayerAttachedObject(playerid, 5, 356,0.345200, -0.124600, 0.111000, 0.000000, 161.000000, 0.000000, 1.000000, 1.000000, 1.000000);
            //SUBSTITUA O SLOT PELO SLOT QUE SERБ USADO PELO OBJETO
            //MODELO = MODELO DO OBJETO QUE VOCК QUER COLOCAR NO JOGADOR. VEJA AQUI: https://sampwiki.blast.hk/wiki/Objectsnl...0.90325755            //OSSO = O OSSO ONDE O OBJETO SERБ COLOCADO. VEJA AQUI: https://sampwiki.blast.hk/wiki/Bone_IDsn...0.90325755            return 1;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)