Player in vehicle need help!
#1

What A day, thanks for helping me on my other post

can you tell me how i can get this to work?

i want it so when you type /car it puts the player in a sultan or cheetah

i have

if(strcmp(cmd, "/car", true) == 0) {
PutPlayerInVehicle(playerid, 560, 0);
return 1;
}

but it doesn't work. What am i doing wrong?

Or is what i am doing imposible?
Reply
#2

Anyone know? or is it impossible to do?
Reply
#3

560 is the model of vehicle, not the ID.
So , you have what made anything like this:
pawn Код:
new sultan;

OnGameModeInit{
sultan=CreateVehicle(560,...);
}

//And in the command:
if(strcmp(cmd, "/car", true) == 0) {
PutPlayerInVehicle(playerid, sultan, 0);
return 1;
}
Reply
#4

When you add a vehicle with AddStaticVehicle(Ex) or CreateVehicle, the vehicleID starts to count from 1.

When you've added two of those the first one is 1, the second one is ID 2.

So you need to add a vehicle before putting them into It.
The "560" should be the ID of the vehicle, not the MODEL number.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)