29.11.2013, 10:20
Well i think changing that return 0; to return 1; will solve the problem. You should never return 0 under OnPlayerUpdate. Everytime a player selects a weapon it will set Fire Weapon to 0 again.
It can be like this.
Or
It can be like this.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
// No weapons in interiors
if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0); // fists
return 1;
}
return 1;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
// No weapons in interiors
if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0); // fists
}
return 1;
}