SA-MP Forums Archive
[HELP] /enter and /exit COmmands - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] /enter and /exit COmmands (/showthread.php?tid=178175)



[HELP] /enter and /exit COmmands - RASTAFARIAN - 20.09.2010

How do you script a /enter command using one command? same with /exit

Anyone have a code they can show me


Re: [HELP] /enter and /exit COmmands - Voldemort - 20.09.2010

/enter

if(IsPlayerInRangeOfPoint(
SetPlayerPos
SetPlayerInterior


Re: [HELP] /enter and /exit COmmands - RASTAFARIAN - 20.09.2010

Ugh I mean, how do you script Multiple ones

This: is my Code but it says "Loose Indentation"

if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,20,1381.9976,-1088.7949,28.0556))
{
SetPlayerPos(playerid,793.12158203125, 157.19657897949, 1003.3627319336);
SetPlayerInterior(playerid, 1);
if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,1480.9829,-1769.9470,18.795)
{
SetPlayerPos(playerid,388.8720,173.8050,1008.382 ;
return 1;


Re: [HELP] /enter and /exit COmmands - Voldemort - 20.09.2010

show script in [pawn] or before check if in all places where is {}{} dont have any space, use Tab


Edit: To make multiple interiors use some Variable for example new CurInt[MAX_PLAYERS];, so on /exit you can recognize in which int you are


Re: [HELP] /enter and /exit COmmands - DarrenReeder - 20.09.2010

Quote:
Originally Posted by RASTAFARIAN
Посмотреть сообщение
Ugh I mean, how do you script Multiple ones

This: is my Code but it says "Loose Indentation"

if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,20,1381.9976,-1088.7949,28.0556))
{
SetPlayerPos(playerid,793.12158203125, 157.19657897949, 1003.3627319336);
SetPlayerInterior(playerid, 1);
if (strcmp("/enter", cmdtext, true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,1480.9829,-1769.9470,18.795)
{
SetPlayerPos(playerid,388.8720,173.8050,1008.382 ;
return 1;
like this:

(/enter){
if(playertopoint(blah){
TELEPORT
}else if(playertopoint(blah)){
teleport
}
}

as much as u want...

thats the layout for it, if you want me to write one up in ZCMD just PM me


Re: [HELP] /enter and /exit COmmands - RASTAFARIAN - 20.09.2010

Alright Darien, hold on