Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz - 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: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz (
/showthread.php?tid=632171)
Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
rezapalang - 10.04.2017
Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz
Pls Helpme

(
Re: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
N3cromancer - 10.04.2017
Look this.
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Re: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
rezapalang - 10.04.2017
i cant find :\ pls find for me or help me to find this
Re: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
khRamin78 - 10.04.2017
PHP Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK)) // this if statement will called when a player presses F or Enter key
{
if(IsPlayerInRangeOfPoint(playerid,2,X,Y,Z) // this would help you to get if player is near biz icon (x y z are your biz icon cordinates
{ // in here it will do actions you want if player is in that range
SetPlayerPos(playerid,x,y,z);
SetPlayerInterior(playerid,interior id);
}
}
return 1;
}
i hope you understand
Read
OnPlayerKeyStateChange
keys
for more and better info
Re: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
VeryTallMidget - 10.04.2017
Are this code used for public server ? Enter or F are used to enter vehicle.
What happens if some vehicle is close to house icon ?
..maybe you can get some ideas from the ManualGearbox script, it was for download in this forum, there was used Y and N to shift gears...
Re: Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz -
khRamin78 - 10.04.2017
Quote:
Originally Posted by VeryTallMidget
Are this code used for public server ? Enter or F are used to enter vehicle.
What happens if some vehicle is close to house icon ?
..maybe you can get some ideas from the ManualGearbox script, it was for download in this forum, there was used Y and N to shift gears...
|
it wont be so annoying just it will be annoying when you wanted to enter a vehicle near a point not entering the interior
and also you can check if any vehicle is more near and it wont enter the icon but its useless players can just push car a little way to enter it

dont take it so importent