change player weapon interior - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: change player weapon interior (
/showthread.php?tid=443721)
change player weapon interior -
N00bKiller - 13.06.2013
I want to ask how to change the interior when a player enters somewhere inside like the casino.
Example: I went inside the casino and I cannot use my weapons cause it automatically rolled to fist for me so I can't even change to any of the weapons......
Here are my codes
pawn Код:
public OnPlayerUpdate(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
//Weapons in interiors
if(GetPlayerInterior(playerid) != 0 && GetPlayerWeapon(playerid) != 0) {
SetPlayerArmedWeapon(playerid,0);
return 0;
}
return 1;
}
Re: change player weapon interior -
Sandiel - 13.06.2013
I don't see where the problem is? What do you want to do exactly?
Re: change player weapon interior -
Guest123 - 13.06.2013
just like this ?
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerInterior(playerid) != 0||1||2||3||4||5||6||7||8||9||10)
{
if(GetPlayerWeapon(playerid))
{
SetPlayerArmedWeapon(playerid,0);
}
}
return 1;
}
Re: change player weapon interior -
N00bKiller - 13.06.2013
Means, when I enter an interior such as lspd (the yellow arrow). I tried to roll to my weapons to use, but it automatically rolled back to fist, lol I came here to rob cops with guns, not to punch with hands......
Re: change player weapon interior -
N00bKiller - 13.06.2013
I want the weapons allowed to use in the interiors.
Re: change player weapon interior -
Vince - 13.06.2013
Then remove that piece of code? What exactly is the problem?
Re: change player weapon interior -
ReVo_ - 13.06.2013
https://sampwiki.blast.hk/wiki/AllowInteriorWeapons
AllowInteriorWeapons(1) in OnGameModeInit
If you have a code where disallow you to use weapons in interior: remove it.
Re: change player weapon interior -
N00bKiller - 13.06.2013
It came a lot of errors when I remove it, also it stopped working when I add on the "AllowInteriorWeapons(1)"