SA-MP Forums Archive
/enter doesn't work... - 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: /enter doesn't work... (/showthread.php?tid=251209)



/enter doesn't work... - Jack_Leslie - 26.04.2011

Код:
if(strcmp(cmdtext, "/enter", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(0, playerid, -382.728332, -1426.146972, 26.256608))
   {
      SetPlayerInterior(3, playerid);
      SetPlayerPos(playerid, 291.282989,310.031982,999.148437);
      return 1;
   }
}

if(strcmp(cmdtext, "/exit", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(3, playerid, 291.282989, 310.031982, 999.148437))
   {
      SetPlayerInterior(0, playerid);
      SetPlayerPos(playerid, -382.728332, -1426.146972, 26.256608);
      return 1;
   }
}
Why wont that work? :S


Re: /enter doesn't work... - nuriel8833 - 26.04.2011

pawn Код:
if(strcmp(cmdtext, "/enter", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3 , -382.728332, -1426.146972, 26.256608))
   {
      SetPlayerInterior(3, playerid);
      SetPlayerPos(playerid, 291.282989,310.031982,999.148437);
      return 1;
   }
}

if(strcmp(cmdtext, "/exit", true, 6) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 291.282989, 310.031982, 999.148437))
   {
      SetPlayerInterior(0, playerid);
      SetPlayerPos(playerid, -382.728332, -1426.146972, 26.256608);
      return 1;
   }
}
1.You placed the paremeters wrong,the 1st param. is playerid,and then the range.
2.In the /enter command you made the range 0,I don't know if you wanted that but I changed it to 3 so it will work better


Re: /enter doesn't work... - Seven_of_Nine - 26.04.2011

Argument mismatch *-*


Re: /enter doesn't work... - Jack_Leslie - 26.04.2011

I got the interior ID and pos off a samp resource site, it's wrong.

Do you know the ID and pos off the barn interior?


Re: /enter doesn't work... - Aizen - 26.04.2011

I use same command like that,i cant exit