Posts: 25
Threads: 8
Joined: Feb 2011
Reputation:
0
hello, i am trying to add a function IsPlayerInRangeofPoint near a house door, and when somebody is entering in that red area to teleport the player to a interior how i can do that?
i need some help thanks
Posts: 25
Threads: 8
Joined: Feb 2011
Reputation:
0
i did that and the compiler didn't gived me errors, but when i entered in the game, the red circle wasn't on the door near the house, what did i do wrong?
Posts: 25
Threads: 8
Joined: Feb 2011
Reputation:
0
yes and i did corectly.
look this is my code:
public OnPlayerSpawn(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -2017.4309,970.1254,45.4794))
SetPlayerCheckpoint(playerid, -2017.4309,970.1254,45.4794,3.0);
return 1;
}
And this is the code for entering the checkpoint
public OnPlayerEnterCheckpoint(playerid)
{
SetPlayerPos(playerid, 1527.229980,-11.574499,1002.097106);
SetPlayerInterior(playerid, 3);
return 1;
}
it's something wrong in the code? i can't figured it out what it can be