10.04.2017, 03:55
Hello i want /enter and /exit used whit [ F Or Enter ] For enter to house or biz
Pls Helpme (
Pls Helpme (
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;
}
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... |