Author Topic: I Need Gotoprop cmd,gotoveh,!cash <id/nick>  (Read 2231 times)

0 Members and 1 Guest are viewing this topic.

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
I Need Gotoprop cmd,gotoveh,!cash <id/nick>
« on: November 12, 2012, 12:33:24 pm »
I need these cmds if any one can help me here!..

Offline Riders

  • Street Thug
  • *
  • Posts: 16
    • View Profile
Re: I Need Gotoprop cmd,gotoveh,!cash <id/nick>
« Reply #1 on: November 12, 2012, 07:29:35 pm »
!cash command i dont know .

[pawn]enum pInfo

GotoProp, /// add this

new playergotoloc[MAX_PLAYERS][128]; /// at down

public GotoPropPlayer()
{
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
        if(IsPlayerConnected(i))
      {
         if(PlayerInfo[GotoProp]<99)
         {
             new splitx[4][128];
            split( dini_Get( "/Pickups/Pickups.ini", IntToStr(PlayerInfo[GotoProp] ) ), splitx, ' ' );
            SetPlayerPos( i, floatstr( splitx[ 1 ] ), floatstr( splitx[ 2 ] ), floatstr( splitx[ 3 ] ), 0, 0 );
            PlayerInfo[GotoProp]=99;
         }
      }
   }
}


else if ( strcmp( cmd, "!gotoprop", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_WHITE, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_YELLOW, "USAGE: !gotoprop [PropertyID]" );
      else if ( !IsPropertyExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_YELLOW, "Error: Unknown Property" );
      else if ( !IsPropertyOwner( strval( tmp ), playerid ) ) SendClientMessage( playerid, COLOR_YELLOW, "Error: That property is not owned by you." );
      else
      {

         format( szMsg, sizeof( szMsg ), "*** pm>> Teleporting to Property %s in 5 seconds", PickupInfo[ strval( tmp ) ][ pName ]  );
         SendClientMessage(playerid,COLOR_GREEN,szMsg);
         GameTextForPlayer(playerid,"Teleporting...");
         playergotoloc[playerid]=tmp;
         PlayerInfo[playerid][GotoProp]=strval( tmp );
         SetTimer ("GotoPropPlayer", 5000, 0);


      }
      return 1;
   }


 else if ( strcmp( cmd, "!gotoveh", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: !gotoveh [VehicleID]" );
      else if ( !IsVehicleExist( strval( tmp ) ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: Unknown Vehicle" );
      else if ( !IsVehicleOwnedShared( strval( tmp ), gPlayers[ playerid ] ) ) SendClientMessage( playerid, COLOR_GREEN, "You do not have the keys for that vehicle." );
      else
      {
       PutDirectlyInVehicle(playerid, strval( tmp ) );
      }
      return 1;
   }[/pawn]

Offline Rey

  • Street Thug
  • *
  • Posts: 12
    • View Profile
Re: I Need Gotoprop cmd,gotoveh,!cash <id/nick>
« Reply #2 on: November 13, 2012, 11:09:46 am »
Thanks Alot Riders it Worked for me its really great... its okey about !cash cmd..i hope i will get that soon...!!