Skip to content

OnPlayerChangeWeapon #992

Open
Open
@hiwyn

Description

@hiwyn

A lot servers have to do it like me:

SetTimerEx("CheckIfPlayersChangedWeapon", 500, true, "i", playerid);


public CheckIfPlayersChangedWeapon(i) {
    new Now_WeaponInHands = GetPlayerWeapon(i);
    if(LastWeaponInHands[i] != Now_WeaponInHands) {
        OnPlayerChangeWeapon(i, LastWeaponInHands[i], Now_WeaponInHands);
        LastWeaponInHands[i] = Now_WeaponInHands;
    }
    return 1;
}

A infinite timer to check every 0.5 sec, to detect if player change weapon, to change weapons on skin and stuff like that

Would be possible on server side to detect and create a new callback
OnPlayerChangeWeapon
???

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions