Problems on installing Stereo - 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: Problems on installing Stereo (
/showthread.php?tid=235647)
Problems on installing Stereo -
leong124 - 06.03.2011
I recently found that my custom car modding system(not the one in transfender) are unable to add stereo(aka Bass Boost) to the vehicles.
Here's my code:
pawn Код:
if(GetPlayerMoney(playerid) >= 500)
{
new Float:px,Float:py,Float:pz,vid;
GetPlayerPos(playerid,px,py,pz);
PlayerPlaySound(playerid,1133,px,py,pz);
AddVehicleComponent((vid = GetPlayerVehicleID(playerid)),1086);
AddVehicleComponent(vid,1086);//I tried to fix that by adding it twice but still failed
SendClientMessage(playerid,COLOR_SGREEN,"Stereo installed successfully.");
GivePlayerMoneyEx(playerid,-500);
}
The message was showed and $500 is reduced, so I think the AddVehicleComponent function works.
I tried to add the component twice instead of once but everything are the same.
The component ID should be correct that I've searched for that in SA-MP Wiki.
Any idea for that
Thanks.
Re: Problems on installing Stereo -
Patrik356b - 17.08.2012
Have you tried different car models?.
It might be blocked on a few vehicles.