How to put the player in what car I want?
#1

Hi.

I've tried to do it using PutPlayerInVehicle but it doesn't works.

Quote:

PutPlayerInVehicle(playerid, 0, 0);

Is there anyone who can help me? Thx
Reply
#2

Quote:
Originally Posted by krawN
I've tried to do it using PutPlayerInVehicle but it doesn't works.
It does.
Reply
#3

change the first 0 to the carid you want to put them in.
Reply
#4

You can do..

pawn Код:
if(strcmp("/mycommand", cmdtext, true, 8) == 0)
    {
      if(IsPlayerInAnyVehicle(playerid))
      {
        new Float:X, Float:Y, Float:Z, Float:A;
        GetPlayerPos(playerid, X, Y, Z);
        GetPlayerFacingAngle(playerid, A);
        new MyVehicle = AddStaticVehicle(VehicleID, X, Y, Z, A, 0, 0);
        PutPlayerInVehicle(playerid, MyVehicle, 0);
        }else{
        SendClientMessage(playerid,0xAA3333AA, "You are already using a vehicle!");
        }
        return 1;
    }
In "VehicleID" you have to put the id of the vehicle you want to seat in.

pd: Not Tested
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)