SA-MP Forums Archive
Setting nitro for car - 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: Setting nitro for car (/showthread.php?tid=108295)



Setting nitro for car - Freddy Z - 13.11.2009

How do i set nitro for a car? for example i want to set nitro x 10 everytime you get in certain vehicles
thanks


Re: Setting nitro for car - (Jeff) - 13.11.2009

Quote:
Originally Posted by Freddy Z
How do i set nitro for a car? for example i want to set nitro x 10 everytime you get in certain vehicles
thanks
I'll Give u a Clue:
pawn Код:
OnPlayerEnterVehicle(playerid, vehicleid)
{
if(vehicleid == yourcar)
 {
  AddVehicleComponent(.....)
 }
}



Re: Setting nitro for car - dice7 - 13.11.2009

https://sampwiki.blast.hk/wiki/AddVehicleComponent


Re: Setting nitro for car - Elmin - 20.12.2009

this should work

if(strcmp(cmd, "/nos", true) == 0) {
new vid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vid, 1010);
SendClientMessage(playerid, RED, "You have successfully add nitrous if your are in vehicle!");
return 1;
}


Re: Setting nitro for car - Flake. - 21.12.2009

Quote:
Originally Posted by Elmin
this should work

if(strcmp(cmd, "/nos", true) == 0) {
new vid = GetPlayerVehicleID(playerid);
AddVehicleComponent(vid, 1010);
SendClientMessage(playerid, RED, "You have successfully add nitrous if your are in vehicle!");
return 1;
}
this will also work with other car mods if you ever want to add other ones on just get the id