vehicleid problem
#1

I was doing this script where it removes a vehicle mod through RemoveVehicleComponent.

Here's an example of it:

pawn Код:
RemoveVehicleComponent(vehicleid,1010);
But I got errors.

So, I tried doing playerid, carid,1010); instead of vehicleid,1010);

Again, I got errors. So I done playerid,1010); and there was no errors, but it didn't remove the nos. I'm honestly confused with what to put there. So any help would be appreciated.
Reply
#2

Show us the errors when you used RemoveVehicleComponent(vehicleid, 1010);

That is the correct way to do it. RemoveVehicleComponent.
Reply
#3

Quote:
Originally Posted by Kindred
Посмотреть сообщение
Show us the errors when you used RemoveVehicleComponent(vehicleid, 1010);

That is the correct way to do it. RemoveVehicleComponent.
error 017: undefined symbol "vehicleid"
Reply
#4

Well obviously, vehicleid is not defined.

Define it. If you don't understand me, you should learn to script before doing anything related to scripting.
Reply
#5

pawn Код:
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
RemoveVehicleComponent(vehicleid,1010);
Use this if it's used for the vehicle you're inside
Reply
#6

Quote:
Originally Posted by RedFusion
Посмотреть сообщение
pawn Код:
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
RemoveVehicleComponent(vehicleid,1010);
Use this if it's used for the vehicle you're inside
This worked, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)