pawn Код:
stock RemovePlayerWeapon(playerid, weaponid)
{
new plyWeapons[12]
new plyAmmo[12]
for(new slot = 0; slot != 12; slot++)
{
new wep, ammo
GetPlayerWeaponData(playerid, slot, wep, ammo)
if(wep != weaponid)
{
GetPlayerWeaponData(playerid, slot, plyWeapons[slot], plyAmmo[slot])
}
}
ResetPlayerWeapons(playerid)
for(new slot = 0; slot != 12; slot++)
{
GivePlayerWeapon(playerid, plyWeapons[slot], plyAmmo[slot])
}
}
To the top of the script.
And then (OnPlayerUpdate)
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,30,-163.2511,2620.0977,78.8033,28.4597)) {
if(GetPVarInt(playerid,"mini") == 0) {
SetPVarInt(playerid,"mini",1);
GivePlayerWeapon(playerid,38,100000);
}
}
if(IsPlayerInRangeOfPoint(playerid,30,-165.4904,2619.2251,98.2914,233.3485)) {
if(GetPVarInt(playerid,"mini") == 1) {
RemovePlayerWeapon(playerid,38);
SetPVarInt(playerid,"mini",0);
}
}
That should do it.