SA-MP Forums Archive
Car Shop script little help - 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: Car Shop script little help (/showthread.php?tid=632797)



Car Shop script little help - STONEGOLD - 19.04.2017

PHP код:
case 14:
            {
                if(
CanCAR{playerid} == false) return SendClientMessage(playeridRED"Please wait before buying any vehicle.");//
                   
if(GetPlayerCash(playerid) > 33000)
                   {
                        new 
CarOne;
                        new 
CarOwnerName[24];
                        
GetPlayerName(playerid,CarOwnerName,24);
                        
CarOne CreateVehicle(4111986.0886,2049.7493,10.5474,135.5690, -1, -1, -1);
                        
SetVehicleNumberPlate(CarOnepData[playerid][NumPlate]);
                        
GivePlayerCashExx(playerid, -33000);
                        
PutPlayerInVehicle(playerid,CarOne,0);
                        
PurchasedCar[CarOne] = 999;
                        
SendClientMessage(playeridGREEN"You have purchased a Infernus for $33,000");
                        
CanCAR{playerid} = false;
                        
SetTimerEx("WaitToBuyCar"8*60000false"d"playerid);
                }
                if (
GetPlayerCash(playerid) < 33000)
                {
                
SendClientMessage(playeridRED"You don't have enough cash.");
                }
            } 
Script works fine but car plate number doesn't work. As you can see in the script i am trying set vehicle plate number from saved data but it's not working it spawns the infernus with XYZ1231 plate number. Any idea what am i doing wrong?

Thank you!


Re: Car Shop script little help - Sjn - 19.04.2017

Wiki note;
Quote:

The vehicle must be re-spawned or re-streamed for the changes to take effect.