Player in vehicle need help! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player in vehicle need help! (
/showthread.php?tid=172891)
Player in vehicle need help! (Reward Included) -
fie - 31.08.2010
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?
Re: Player in vehicle need help! -
fie - 31.08.2010
Anyone know? or is it impossible to do?
Respuesta: Player in vehicle need help! -
CyNiC - 31.08.2010
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;
}
Re: Player in vehicle need help! -
Mike Garber - 31.08.2010
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.