SA-MP Forums Archive
[Help] Command /goto - 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)
+--- Thread: [Help] Command /goto (/showthread.php?tid=286278)



Fixed - Nick. - 27.09.2011

Fixed


Re: [Help] Command /goto - Snipa - 27.09.2011

https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/ShowPlayerDialog


Re: [Help] Command /goto - Kostas' - 27.09.2011

pawn Код:
if ( strcmp( cmdtext, "/goto", true ) == 0 )
    {
      new tmp[256];
      tmp = strtok( cmdtext, idx );

      if ( !strlen( tmp ) ) { return 1; }

      new Float:X, Float:Y, Float:Z;

      if ( GetPlayerVehicleID( playerid ) )
      {
          GetPlayerPos( strval(tmp), X, Y, Z );
          SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z );
      } else {
          GetPlayerPos( strval(tmp), X, Y, Z );
          SetPlayerPos( playerid, X+2, Y+2, Z );
      }

      return 1;
    }



Re: [Help] Command /goto - Nick. - 28.09.2011

[fixed


Re: [Help] Command /goto - Kingunit - 28.09.2011

Do you know how to work with dialogs? It's better to learn then asking.


Fixed - Nick. - 28.09.2011

fixed


Re: [Help] Command /goto - Nick. - 28.09.2011

fixed


Fixed - Nick. - 30.09.2011

fixed


Re: [Help] Command /goto - Cjgogo - 30.09.2011

replace if strlen(inputtext) with
Код:
if(strval(inputtext) == pID)
because strlen means text and strval it's a number.By my SAMP knoweldege a player ID is an number