IsPlayerInRangeOfPoint
#1

Okay, I want to create a command that'll teleport me to a map I've created. But I want it only to be able to TP there if the player is at the LS stadium. I've made it this far:
Quote:

{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.843)
SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
return 1;
}

I'm not sure how to continue, I guess I should type SetPlayerPos(playerid, coords where the map is); And please don't tell me to visit samp wiki. I've looked there and couldn't find what I am looking for.
I'm a noob at pawn, so please, help me out!
Reply
#2

just do setplayerpos under the message you made.

should work..just try .

if you are teleporting to an interior you should find the interior id and use setplayerinterior to

have fun!
Reply
#3

I tried this:
Код:
    {
 		if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
 		SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
 		SetPlayerInterior(playerid, 0);
 		SetPlayerPos(playerid, 1970.3921, -1276.3458, 23.9908);
  	    return 1;
	}
Problem: It lets me teleport to the coords wherever I am, I want it to only let me once I'm at the stadium.
Anyone know how to solve this?

EDIT: Fixed!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)