02.09.2017, 10:46
Nah, in my code door/house, i want when player near pickup, and type /enter
Player will teleporting to any position
How to do this ?
Player will teleporting to any position
How to do this ?
CMD:enter(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,.....))
{
SetPlayerPos(playerid);
...............
}
}
CMD:enter(playerid, params[])
{
// You need here the coordinates (X, Y and Z) of the door
// The 2nd parameter after "playerid" is the range,
// if the player is out of that range,
// (in this case 5) the command won't work
if(IsPlayerInRangeOfPoint(playerid, 5, X , Y , Z))
{
// Now you need here the X Y and Z coordinates of the house point where the player will be teleported
// You will need the interior too, either the player will fall in the sky!
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, HouseInterior);
SendClientMessage(playerid, -1, "{f0f0f0}You entered the house!");
}
else return SendClientMessage(playerid, -1, "{ff0000} You aren't near the door!"); //Player is not at the door
return 1;
}