[Help] Command /goto
#1

Fixed
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#3

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;
    }
Reply
#4

[fixed
Reply
#5

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

fixed
Reply
#7

fixed
Reply
#8

fixed
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)