I need to know how to make a /enter command -
SAMPTUTORIALS - 28.08.2011
I want to know how to make A /ENTER command which teleports you to a location when typed.
AddPlayerClass(288,1570.9875,-1336.9447,16.4844,133.8545,0,0,0,0,0,0); // Bottom
AddPlayerClass(288,1548.6855,-1364.6135,326.2109,2.9033,0,0,0,0,0,0); // Top
Well basically I want to make a /enter command which teleports you to the top of star tower. I put Bottom and Top to show which is which. Bottom is where the /enter command is. Top is where your gonna be teleported. Please Please tell me how
AW: I need to know how to make a /enter command -
Forbidden - 28.08.2011
Huh?
do a simple command called /enter
SetPlayerPos(playerid,1570.9875,-1336.9447,16.4844);//to the building ,if not then put the second to this
Command for example /exit
SetPlayerPos(playerid,1548.6855,-1364.6135,326.2109);//teleport to anywhere
Re: I need to know how to make a /enter command -
SAMPTUTORIALS - 28.08.2011
Thats not what I mean. I wanna script it into my server and I don't want a /exit command
Re: I need to know how to make a /enter command -
Cyanide - 28.08.2011
You can use
IsPlayerInRangeOfPoint to check the coordinates of a player, and
SetPlayerPos to set a client's position.
Re: I need to know how to make a /enter command -
SAMPTUTORIALS - 28.08.2011
Can you give me Codes because thats what I don't know doing
Re: I need to know how to make a /enter command -
Cyanide - 28.08.2011
You can request code snippets
here.
Re: I need to know how to make a /enter command -
VitalRP - 28.08.2011
pawn Code:
CMD:enter(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1570.9875, -1336.9447,16.4844))
{
SetPlayerPos(playerid, 1548.6855,-1364.6135,326.2109);
GameTextForPlayer(playerid, "Welcome to the star tower!", 3000, 4)
}
else
{
SendClientMessage(playerid, COLOR, "You are not near an entrance!");
}
return 1;
}
EDIT:
Add this to your script aswell if you want a pickup.
pawn Code:
AddStaticPickup(1318, 1, 1570.9875, -1336.9447,16.4844, 0)