IsPlayerToPoint and interior ID's -
Andy_McKinley - 16.04.2010
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;
Re: IsPlayerToPoint and interior ID's -
Norck - 16.04.2010
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)
Re: IsPlayerToPoint and interior ID's -
Andy_McKinley - 16.04.2010
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?
Re: IsPlayerToPoint and interior ID's -
brett7 - 16.04.2010
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
Re: IsPlayerToPoint and interior ID's -
Andy_McKinley - 16.04.2010
Quote:
Originally Posted by brett7
you need something to call the isplayerinrangeofpoint
|
And how can I do that?
Re: IsPlayerToPoint and interior ID's -
Norck - 16.04.2010
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.
Re: IsPlayerToPoint and interior ID's -
DRIFT_HUNTER - 16.04.2010
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)
Re: IsPlayerToPoint and interior ID's -
Andy_McKinley - 16.04.2010
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.
Re: IsPlayerToPoint and interior ID's -
Adil - 16.04.2010
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).
Re: IsPlayerToPoint and interior ID's -
Andy_McKinley - 17.04.2010
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.