help weapon slot
#1

how can i make script that if player have weapon 1 slot return 1;

thks
Reply
#2

Hey!

Here it is:
pawn Код:
stock IsWeaponInSlot(playerid, slot)
{
    new wData[13][2];
    for(new s=0; s<13; s++)
    {
        GetPlayerWeaponData(playerid, s, wData[s][0], wData[s][1]);
    }
    if(wData[slot][0] != 0) return 1;
    return 0;
}
Reply
#3

@Nonameman, you couldn't complicate it mroe, could you?

pawn Код:
stock IsWeaponInSlot(playerid, slot)
{
    new wdata[2]; GetPlayerWeaponData(playerid,slot,wdata[0],wdata[1]);
    if(wdata[0] > 0) return 1;
    else return 0;
}
Reply
#4

Offtopic: I could, but I don't think it's a problem. (I haven't used GetPlayerWeaponData() before)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)