SA-MP Forums Archive
No Switching - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: No Switching (/showthread.php?tid=149013)



No Switching - OldDirtyBastard - 20.05.2010

Woud there be a possible script to completly disable switching?(reload with swiching disabled included)
Thinking about that the reloading animation by the sawn-off shotgun coudnt be canceled at all....
Greetings Mr ODB


Re: NoSwitch - cessil - 20.05.2010

just made this and it worked

Код:
CMD:dz(playerid,params[])
{
	SetPVarInt(playerid,"reloadtimer",SetTimer("giveammo",100,1));
	return 1;
}
CMD:da(playerid,params[])
{
	KillTimer(GetPVarInt(playerid,"reloadtimer"));
	return 1;
}
forward giveammo();
public giveammo()
{
	GivePlayerWeapon(0,26,75);
}
it'll keep toggling back to sawn offs though, but I think you could stop it using OnPlayerKeyStateChange


Re: NoSwitch - OldDirtyBastard - 21.05.2010

hmm ill try it out thx, but if some1 has something that he thinks its better post it


Re: NoSwitch - OldDirtyBastard - 21.05.2010

...


Re: NoSwitch - OldDirtyBastard - 24.05.2010

ehm quick guide where i shoud put it pplease?