SA-MP Forums Archive
Casino SAMP - 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: Casino SAMP (/showthread.php?tid=600468)



Casino SAMP - Ugaustin - 08.02.2016

hi does anyone know how can I stop the original samp slots??I have a different system and I want to delete the "ENTER" slots..


Re: Casino SAMP - Joron - 08.02.2016

Quote:
Originally Posted by Ugaustin
Посмотреть сообщение
hi does anyone know how can I stop the original samp slots??I have a different system and I want to delete the "ENTER" slots..
What slots? be specific


Re: Casino SAMP - Ugaustin - 08.02.2016

casino slots, I press enter and I play, originaly from SAMP,i want to delete it!


Re: Casino SAMP - Joron - 08.02.2016

Quote:
Originally Posted by Ugaustin
Посмотреть сообщение
casino slots, I press enter and I play, originaly from SAMP,i want to delete it!
I think you cant even if you use
https://sampwiki.blast.hk/wiki/DisableInteriorEnterExits


Re: Casino SAMP - ikey07 - 08.02.2016

save areas around tables, and when player hits Enter, teleport them outside, that will make them not use them.


Re: Casino SAMP - Sascha - 08.02.2016

I've tried out it with teleporting, although it didn't work out for me on the black jack tables if I didn't set the position outside of the interior..
A working fix that will not change the position for me was this:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_SECONDARY_ATTACK)
	{
	    if(GetPlayerInterior(playerid) == 1)
	    {
			new Float:Pos[3];
			GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
			SetPlayerInterior(playerid, 0);
			SetTimerEx("SetBack", 200, false, "iifff", playerid, 1, Pos[0], Pos[1], Pos[2]);
		}
	}
	return 1;
}
forward SetBack(playerid, interior, Float:x, Float:y, Float:z);
public SetBack(playerid, interior, Float:x, Float:y, Float:z)
{
	SetPlayerPos(playerid, x, y, z);
	SetPlayerInterior(playerid, interior);
	SetCameraBehindPlayer(playerid);
	TogglePlayerControllable(playerid, 1);
	return 1;
}
You shall specify the "interior" to a suitable area as ikey07 suggested though.
If you change a player's interior, this will make the default textdraws disappear and will remove the player being detected as playing.
So basicly add areas and check whether the player is in the area when pressing ENTER as said before. Then change the players interior and change it back immediately. The timer might not be necessarry, although lags 'caused me to fall down without that timer setting me back.