vehicleid 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)
+--- Thread: vehicleid problem (
/showthread.php?tid=445116)
vehicleid problem -
Realds - 19.06.2013
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.
Re: vehicleid problem -
Kindred - 19.06.2013
Show us the errors when you used RemoveVehicleComponent(vehicleid, 1010);
That is the correct way to do it.
RemoveVehicleComponent.
Re: vehicleid problem -
Realds - 19.06.2013
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"
Re: vehicleid problem -
Kindred - 19.06.2013
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.
Re: vehicleid problem -
RedFusion - 19.06.2013
pawn Код:
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
RemoveVehicleComponent(vehicleid,1010);
Use this if it's used for the vehicle you're inside
Re: vehicleid problem -
Realds - 19.06.2013
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