23.06.2014, 09:46
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.
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY)
{
//code here
return 1;
}
return 1;
}
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;
}