SA-MP Forums Archive
vehicle problem - 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: vehicle problem (/showthread.php?tid=223899)



vehicle problem - park4bmx - 10.02.2011

ok so is simple i want to detect if the player goes in to this boat

i got this
pawn Код:
new Boat1;
new Boat2;
Then This
pawn Код:
Boat1 = AddStaticVehicleEx(453,2375.82153320,531.12689209,0.00000000,179.45959473,-1,-1,15); //Reefer
Boat2 = AddStaticVehicleEx(453,2065.95507812,-236.42036438,0.00000000,0.00000000,-1,-1,15); //Reefer
And finally
pawn Код:
if(GetVehicleModel(vehicleid) == Boat1){
//blablabla
}else if(GetVehicleModel(vehicleid) == Boat2){
//blablabla
}



AW: vehicle problem - Nero_3D - 10.02.2011

If you want it for the model do it like that
pawn Код:
if(GetVehicleModel(vehicleid) == 453){
}
If you want only the defined vehicles than do
pawn Код:
if(vehicleid == Boat1 || vehicleid == Boat2) {
}



Re: vehicle problem - Riddick94 - 10.02.2011

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
@Up - He wan't to get player when he'll enter one of these boats..
@Down - Lol.. my bad english?


Re: AW: vehicle problem - park4bmx - 10.02.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
If you want it for the model do it like that
pawn Код:
if(GetVehicleModel(vehicleid) == 453){
}
If you want only the defined vehicles than do
pawn Код:
if(vehicleid == Boat1 || vehicleid == Boat2) {
}
oh THANKS v MUCh