Need help - 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: Need help (
/showthread.php?tid=521480)
Need help -
CodyAlzack - 23.06.2014
I'd really appreciate if you help me with this. I want you to script this: if you are near a door then you can click F or Enter to enter the door.
Re: Need help -
Jack_Leslie - 23.06.2014
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY)
{
//code here
return 1;
}
return 1;
}
Find keys here:
https://sampwiki.blast.hk/wiki/Keys
And use the "Macro", example: KEY_ACTION
Re: Need help -
CodyAlzack - 23.06.2014
The problem is that i don't have any clue what the code should be.
Re: Need help -
Jack_Leslie - 23.06.2014
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z)) // This X, Y, Z being where the door position is
{
SetPlayerInterior(playerid, interior);
SetPlayerPos(playerid, X, Y, Z); // This X, Y, Z being the interior
return 1;
}
Re: Need help -
CodyAlzack - 23.06.2014
Unable to compile it. This is the errors:
http://prntscr.com/3vmrko
Re: Need help -
CodyAlzack - 23.06.2014
I also want help with one thing more, its a cmd that i've done, and i need some help with it. its /playcasino [amount of cash you want to play with] and then it decides random who will win, and then you get double amount of money of what u played with.