Teleport Private vehicles
#1

I have created some private vehicles using this codes:

Код:
vls = AddStaticVehicle(468,-2622.9917,2286.4600,7.8810,357.9488,0,0);
Код:
new terryw[24]; // We create a variable which will contain the players name.
  GetPlayerName(playerid, terryw, sizeof(terryw)); // We use GetPlayerName to store the name in 'PlayerName'.

  if(newstate == PLAYER_STATE_DRIVER) // Check the new state, since he's the driver in this case, we continue.
  {
   new Vehicle = GetPlayerVehicleID(playerid); // This saves the player's vehicle id into the variable 'vehicle'
   if(Vehicle == vls) // We check if the vehicle is the one we don't want everyone to enter
   { // It is, so we continue.
     if(strcmp(terryw,"vls",true)) // We use strcmp to check if the player who entered the car is the same as 'Matthias'
     {
      RemovePlayerFromVehicle(playerid); // It's not, so we remove the player from the car.
      SendClientMessage(playerid, 0x33AA33AA, "This is only for vls"); // And we inform him about why he got removed from the car.
     }
   }
  }
so now i need a command that will teleport the player's private vehicle to him when he type /telemycar
how to make this command? :/
Reply
#2

Quote:
Originally Posted by NitoPSG
Посмотреть сообщение
I have created some private vehicles using this codes:

Код:
vls = AddStaticVehicle(468,-2622.9917,2286.4600,7.8810,357.9488,0,0);
Код:
new terryw[24]; // We create a variable which will contain the players name.
  GetPlayerName(playerid, terryw, sizeof(terryw)); // We use GetPlayerName to store the name in 'PlayerName'.

  if(newstate == PLAYER_STATE_DRIVER) // Check the new state, since he's the driver in this case, we continue.
  {
   new Vehicle = GetPlayerVehicleID(playerid); // This saves the player's vehicle id into the variable 'vehicle'
   if(Vehicle == vls) // We check if the vehicle is the one we don't want everyone to enter
   { // It is, so we continue.
     if(strcmp(terryw,"vls",true)) // We use strcmp to check if the player who entered the car is the same as 'Matthias'
     {
      RemovePlayerFromVehicle(playerid); // It's not, so we remove the player from the car.
      SendClientMessage(playerid, 0x33AA33AA, "This is only for vls"); // And we inform him about why he got removed from the car.
     }
   }
  }
so now i need a command that will teleport the player's private vehicle to him when he type /telemycar
how to make this command? :/
pleaseeee!!!! helpp!!!!!!!
Reply
#3

Get the players position and use the SetVehiclePos function...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)