OnPlayerSwitchWeapon
#5

Easy to make, put this into your script:

pawn Код:
new lastWeapon[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    lastWeapon[playerid] = 0;
    return 1;
}

public OnPlayerUpdate(playerid)
{
    new w = GetPlayerWeapon(playerid);
    if(w != lastWeapon[playerid])
    {
        OnPlayerChangeWeapon(playerid, w, lastWeapon[playerid]);
    }
    lastWeapon[playerid] = w;
    return 1;
}

OnPlayerChangeWeapon(playerid, newgun, oldgun)
{
    return 1;
}
Reply


Messages In This Thread
OnPlayerSwitchWeapon - by milanosie - 13.05.2012, 13:15
Re: OnPlayerSwitchWeapon - by iRage - 13.05.2012, 13:18
Re: OnPlayerSwitchWeapon - by milanosie - 13.05.2012, 13:19
Re: OnPlayerSwitchWeapon - by iRage - 13.05.2012, 13:21
Re: OnPlayerSwitchWeapon - by SuperViper - 13.05.2012, 13:42
Re: OnPlayerSwitchWeapon - by milanosie - 13.05.2012, 13:46

Forum Jump:


Users browsing this thread: 1 Guest(s)