IsPlayerToPoint and interior ID's
#1

I need info about IsPlayerToPoint AND I need ALL the Interior ID's.

I never tried IsPlayerToPoint. Is it like this?
pawn Код:
IsPlayerToPoint(playerid, X,Y,Z);
SetPlayerPos(playerid, X,Y,Z);
SetPlayerInterior(playerid, ID);
return 1;
Reply
#2

Are you talking about IsPlayerInRangeOfPoint? If so, then
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Interiors can be found here
http://files.sa-mp.com/
(interiors.txt)
Reply
#3

Got it, but it's weird... I want when a player walks into a point, teleporting to a pos.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, -2897.8477,471.6390,5.7381));
    {
      SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
      SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
      return 1;
    }
what now?
Reply
#4

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, -2897.8477,471.6390,5.7381))  <-no semi colon
    {
      SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
      SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
      return 1;
    }
you need something to call the isplayerinrangeofpoint
Reply
#5

Quote:
Originally Posted by brett7
you need something to call the isplayerinrangeofpoint
And how can I do that?
Reply
#6

Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by brett7
you need something to call the isplayerinrangeofpoint
And how can I do that?
For example, with this cmd:
[code=PAWN]if(!strcmp(cmdtext,"/testteleport",true))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2897.8477,471.6390,5.7381))//If player near this pos...
{
SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
return 1;
}
return 1;
}[/code]
But there is should be some interior for your destination position.
Reply
#7

Quote:
Originally Posted by DarkPhoenix
Got it, but it's weird... I want when a player walks into a point, teleporting to a pos.
whay you just dont create pickup and set diferent world for pickup (if you dont whona player's see pickup)
Reply
#8

Quote:
Originally Posted by Sinyavski
Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by brett7
you need something to call the isplayerinrangeofpoint
And how can I do that?
For example, with this cmd:
[code=PAWN]if(!strcmp(cmdtext,"/testteleport",true))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, -2897.8477,471.6390,5.7381))//If player near this pos...
{
SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
return 1;
}
return 1;
}[/code]
But there is should be some interior for your destination position.
I don't get the ''cmdtext, "/testteleport",true))
Someone needs to type /testteleport? I was talking about just walking to that point and automaticly tped to the pos I want.
Reply
#9

Quote:
Originally Posted by DarkPhoenix
I don't get the ''cmdtext, "/testteleport",true))
Someone needs to type /testteleport? I was talking about just walking to that point and automaticly tped to the pos I want.
The script needs a certain time to the specific task you have given. for example:
pawn Код:
SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
This needs to be put into a callback to tell the script to do the certain task on that certain time(callback, that's when the function gets called).
Reply
#10

Quote:
Originally Posted by Adil
Quote:
Originally Posted by DarkPhoenix
I don't get the ''cmdtext, "/testteleport",true))
Someone needs to type /testteleport? I was talking about just walking to that point and automaticly tped to the pos I want.
The script needs a certain time to the specific task you have given. for example:
pawn Код:
SetPlayerPos(playerid, 2323.7063, -1147.6509, 1050.7101);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "Welcome to the Donator HQ.");
This needs to be put into a callback to tell the script to do the certain task on that certain time(callback, that's when the function gets called).
I don't understand this. Give an example, no command, just when player enters that position.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)