Show when enter!
#1

Im talking about adding vehicle components...and i was wondering if there is a way so it will only show up when u enter the vehicle!
Ow yea and what about paintjobs...how do u add them?
I have found a Topic here but it didnt work...if someone can give me some Infos about how to do it would be great!

Thanks in advance!
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
Reply
#3

Quote:
Originally Posted by † мąүқоҳ™
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
I tried this but it didnt work...maybe i didnt do it well :S
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 AddVehicleComponent(car8,1010);
    return 1;
}
Like this?
Reply
#4

Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by † мąүқоҳ™
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
I tried this but it didnt work...maybe i didnt do it well :S
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 AddVehicleComponent(car8,1010);
    return 1;
}
Like this?
Creating an alternate variable would not be necessary if you're applying modifications to the vehicle they enter, but you're on the right tracks.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  AddVehicleComponent(vehicleid, 1010);
  return 1;
}
Reply
#5

Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by † мąүқоҳ™
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
I tried this but it didnt work...maybe i didnt do it well :S
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 AddVehicleComponent(car8,1010);
    return 1;
}
Like this?
Creating an alternate variable would not be necessary if you're applying modifications to the vehicle they enter, but you're on the right tracks.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  AddVehicleComponent(vehicleid, 1010);
  return 1;
}
Yea but if i have more cars...to which i wanna add parts...i have to use only that? but that wont add nos to every car i enter?:S
Reply
#6

Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by † мąүқоҳ™
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
I tried this but it didnt work...maybe i didnt do it well :S
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 AddVehicleComponent(car8,1010);
    return 1;
}
Like this?
Creating an alternate variable would not be necessary if you're applying modifications to the vehicle they enter, but you're on the right tracks.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  AddVehicleComponent(vehicleid, 1010);
  return 1;
}
Yea but if i have more cars...to which i wanna add parts...i have to use only that? but that wont add nos to every car i enter?:S
You need to get Vehicleid (that means the vehicle id not modelid) It will only add parts to that vehicle id not any other veh.
Reply
#7

Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ColdXX
Quote:
Originally Posted by † мąүқоҳ™
https://sampwiki.blast.hk/wiki/OnPlayerEnterVehicle ... Put that compotents here (Stuff that you usualy add) It should work i guess... Idk about the paintjobs.
I tried this but it didnt work...maybe i didnt do it well :S
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
 AddVehicleComponent(car8,1010);
    return 1;
}
Like this?
Creating an alternate variable would not be necessary if you're applying modifications to the vehicle they enter, but you're on the right tracks.

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  AddVehicleComponent(vehicleid, 1010);
  return 1;
}
Yea but if i have more cars...to which i wanna add parts...i have to use only that? but that wont add nos to every car i enter?:S
Then you'll have to use alternate variables, my post was merely stating that when you enter 1 vehicle you'll only want to affect that 1 - so create 1 variable, if not then you will need alternate variables.
Reply
#8

yea i see...thanks
Reply
#9

Thought that bumping topic is better than creating new one.

I would like to know, how to get script to detect vehicle name and then show it. Right now, it is showing the ID of the vehicle, but I want to get the name to be shown also.
I know there is a easier way than putting:
pawn Код:
if(GetVehicleModel(playerid) == 400)
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You entered Landstalker(400).");
}
etc...

How to make it?
Reply
#10

Here are your vehicle names:
Код:
new VehicleNames[212][] = {
{"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
{"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
{"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
{"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
{"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
{"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
{"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
{"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
{"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
{"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
{"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
{"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
{"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
{"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
{"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
{"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
{"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
{"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
{"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
{"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
{"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
{"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
{"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
{"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
{"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
{"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
{"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
{"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
{"Utility Trailer"}
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)