12.08.2012, 19:53
pawn Код:
public OnPlayerUpdate(playerid)
{
new pCurWeap = GetPlayerWeapon(playerid);
if(InsideMainMenu[playerid] == 1) SetPlayerArmedWeapon(playerid, 0);
if(TutStep[playerid] > 0) SetPlayerArmedWeapon(playerid, 0);
if(GetPVarInt(playerid, "Injured") == 1) SetPlayerArmedWeapon(playerid, 0);
if(GetPVarInt(playerid, "IsFrozen") == 1) TogglePlayerControllable(playerid, 0);
if(pCurWeap != pCurrentWeapon[playerid])
{
OnPlayerChangeWeapon(playerid, pCurWeap);
pCurrentWeapon[playerid] = pCurWeap;
}
return 1;
if((GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45) && !IsPlayerInAnyVehicle(playerid))
{
new keys, ud, lr;
GetPlayerKeys(playerid, keys, ud, lr);
if(keys & KEY_FIRE)
{
return 0;
}
}
}