25.08.2012, 22:44
(
Последний раз редактировалось FeelLikeASir_; 26.08.2012 в 01:36.
)
Diferente de AllowInteriorWeapons, BlockWeaponsInInterior bloqueia armas no interior que desejar.
Exemplo:
*Le cуdigo*
Fiz em 1min, nem testei direito, qualquer bug, avisar.
FellLikeASir_.
Exemplo:
pawn Код:
main() {
BlockWeaponsInInterior(true, 2, 3, 5);
}
pawn Код:
#define MAX_INTS 18
new Interiors[MAX_INTS char];
BlockWeaponsInInterior(bool:block, ...) {
for(new i = numargs(); i > 1; --i) {
Interiors{getarg(i)} = _:block;
}
}
public OnPlayerUpdate(playerid) {
if(Interiors{GetPlayerInterior(playerid)}) {
SetPlayerArmedWeapon(playerid, 0);
}
return CallLocalFunction("OnPlayerUpdateEx", "i", playerid);
}
#if defined _ALS_OnPlayerUpdate
#undef OnPlayerUpdate
#else
#define _ALS_OnPlayerUpdate
#endif
#define OnPlayerUpdate OnPlayerUpdateEx
OnPlayerUpdateEx(playerid);
FellLikeASir_.