2 players aiming on adm=no weapon
#1

Hey guys,i'm trying to make a sistem but i don't know how,i wanna make 2 things,first,if some player aim at a adm (in work) the weapon change to 0 (fist) (adm working line: admtrampando[playerid] = 1; )

and if 2 players aim at one,this one will make the handsup animation automatic,how can make this sistem for me? is fast to do but i don't know what to use :/
Reply
#2

pawn Код:
public OnPlayerUpdate(playerid)
{
    new p = GetPlayerTargetPlayer(playerid);
   
    if(p == INVALID_PLAYER_ID)
    {
    }
    else
    {
    //First thing you want
    if(admtrampando[playerid] == 1)
    {
    GivePlayerWeapon(playerid, 0, 1);
    }
    //Second thing you want
    SetPlayerSpecialAction(p, SPECIAL_ACTION_HANDSUP);
    }
    return 1;
}
Reply
#3

ok thanks but the second thing i want only if 2 players aim,this code will make only 2 player aim and set the action :P
Reply
#4

I am not sure, what u want. This causes, that when player1 aim player2 and player2 aim player1, player2 will hands up.
pawn Код:
public OnPlayerUpdate(playerid)
{
    new p = GetPlayerTargetPlayer(playerid);
   
    if(p != INVALID_PLAYER_ID)
    {
    //First thing you want
    if(admtrampando[playerid] == 1)
    {
    GivePlayerWeapon(playerid, 0, 1);
    }
    //Second thing you want
   if(GetPlayerTargetPlayer(p) == playerid)
   {
   SetPlayerSpecialAction(p, SPECIAL_ACTION_HANDSUP);
    }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)