02.06.2013, 18:49
nгo sei seta certo mais tente
pawn Код:
public OnPlayerInteriorChange(playerid,newinteriorid,oldi nteriorid)
{
if(newinteriorid && !oldinteriorid)
{
for(new i = 0; i < 13; i ++)
{
GetPlayerWeaponData(playerid, i, Armas[playerid][i], Ammo[playerid][i]);
}
new reset;
SetPVarInt(playerid, "Armas", 1);
ResetPlayerWeapons(playerid);
reset = SetTimerEx("resetar", 1000, true, "d", playerid);
SendClientMessage(playerid, 0xFFFF00FF, "Suas armas foram retiradas, pois nгo й permitido usб-las em interior. Quando vocк sair, elas serгo devolvidas.");
}
else if(!newinteriorid)
{
if((GetPVarInt(playerid, "Armas")) && (!GetPVarInt(playerid, "Weapons")))
{
for(new i = 0; i < 13; i ++)
GivePlayerWeapon(playerid, Armas[playerid][i], Ammo[playerid][i]);
DeletePVar(playerid, "Armas");
KillTimer("reset");
SendClientMessage(playerid, 0xFFFF00FF, "Suas armas foram reentregues.");
}
DeletePVar(playerid, "Weapons");
}
return 1;
}