02.02.2009, 02:13
Use OnPlayerInteriorChange and use GetPlayerWeaponData to store their weapons when they enter the interior and give it back when they leave.
Try that.
pawn Code:
new pW[MAX_PLAYERS][13]
new pA[MAX_PLAYERS][13];
public OnPlayerInteriorChange(playerid,newinteriorid,oldinteriorid)
{
if(newinteriorid == 0 && oldinteriorid == //interiorwithnoweapons)
{
for(new w=0;w<13;w++)
{
GivePlayerWeapon(playerid,pW[playerid][w],pA[playerid][w]);
}
}
if(newinteriorid == //interiorwithnoweapons)
{
for(new w=0;w<13;w++)
{
GetPlayerWeaponData(playerid,w,pW[playerid][w],pA[playerid][w]);
ResetPlayerWeapons(playerid);
}
}
}