06.03.2011, 03:10
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:
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 thatThanks.
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);
}
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 thatThanks.