12.08.2012, 19:51
Bueno, mi OnPlayerUpdate es йste:
Ahora, leн algo para hacer que las gafas tйrmicas funcionen correctamente, haciendo йsto en OnPlayerUpdate:
Mi pregunta es, como aсadir el segundo cуdigo que puse a mi OnPlayerUpdate agregбndolo correctamente..
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;
}
pawn Код:
if((GetPlayerWeapon(playerid) == 44 || GetPlayerWeapon(playerid) == 45) && !IsPlayerInAnyVehicle(playerid))
{
new keys, ud, lr;
GetPlayerKeys(playerid, keys, ud, lr);
if(keys & KEY_FIRE)
{
return 0;
}