/acreatecar [BUG]
#1

A cousin gave me an code but..if i put car 424 its buying price is 99$..and others good..why??il give you the cmd on pm....i cant post it here.
Reply
#2

And why can't you post it here?
Reply
#3

If you can't post your code here then don't ask for help.
And, the price is set in the script for each and every car.
Reply
#4

PHP код:
if(strcmp(cmd"/acreatecar"true) == 0)
                    {
                        if(
IsPlayerAdmin(playerid))
                        {
                            
tmp strtok(cmdtextidx);
                            if(!
strlen(tmp))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /acreatecar [carid] [culoare1] [culoare2] [Pretul]");
                                return 
1;
                            }
                            new 
car;
                            
car strval(tmp);
                            if(
car 400 || car 611) { SendClientMessage(playeridCOLOR_WHITE" Vehicle Number can't be below 400 or above 611 !"); return 1; }
                            
tmp strtok(cmdtextidx);
                            if(!
strlen(tmp))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /acreatecar [carid] [culoare1] [culoare2] [Pretul]");
                                return 
1;
                            }
                            new 
color1;
                            
color1 strval(tmp);
                            if(
color1 || color1 126) { SendClientMessage(playeridCOLOR_WHITE" Color Number can't be below 0 or above 126 !"); return 1; }
                            
tmp strtok(cmdtextidx);
                            if(!
strlen(tmp))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /acreatecar [carid] [culoare1] [culoare2] [Pretul]");
                                return 
1;
                            }
                            new 
color2;
                            
color2 strval(tmp);
                            if(
color2 || color2 126) { SendClientMessage(playeridCOLOR_WHITE" Color Number can't be below 0 or above 126 !"); return 1; }
                            
tmp strtok(cmdtextidx);
                            if(!
strlen(tmp))
                            {
                                
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /acreatecar [carid] [culoare1] [culoare2] [Pretul]");
                                return 
1;
                            }
                            new 
value;
                            
value strval(tmp);
                            new 
Float:X,Float:Y,Float:ZGetPlayerPos(playeridX,Y,Z);
                            new 
thiscar CreateVehicle(car,X,Y,Z,1,color1,color2,-1);
                            
format(CarInfo[thiscar][cLicense], 32 ,"Dealership");
                            
SetVehicleNumberPlate(vehid,CarInfo[thiscar][cLicense]);
                            
CarInfo[thiscar][cOwned] = 0CarInfo[thiscar][cModel] = carCarInfo[thiscar][cColorOne] = color1CarInfo[thiscar][cColorTwo] = color2;
                            
CarInfo[thiscar][cLocationx] = XCarInfo[thiscar][cLocationy] = YCarInfo[thiscar][cLocationz] = ZCarInfo[thiscar][cAngle] = 1;
                            
CarInfo[thiscar][cValue] = valueCarInfo[thiscar][cLock] = 0CarInfo[thiscar][paintjob] = -1LoadComponents(thiscar);
                            
PutPlayerInVehicle(playerid,thiscar,0);
                            
strmid(CarInfo[vehid][cOwner], "Dealership"0strlen("Dealership"), 999);
                            
format(CarInfo[thiscar][cDescription], 32"%s",Vehicles[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
                            
format(stringsizeof(string), " Masina %d a fost creata cu succes!."thiscar);
                            
SendClientMessage(playeridCOLOR_BLUEstring);
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GRAD1" you are not authorized to use that command!");
                            return 
1;
                        }
                    } 
i cant find where price is putted..cause there are more vehicles..
Reply
#5

Maybe someone will, maybe not. But im pretty sure nobody will pm you about it. Thats the price for help i guess
Reply
#6

This the command for creating a car not buying or selling it.
Reply
#7

yeah,i createcar and its 99$..its value..
Reply
#8

The cost is defined somewhere in your script. Search it and do the modifications on it. Don't ask us to search it for you.
Reply
#9

I guess you have a public with the car prices. Go in your script and search for public GetVehiclePrice(vehicleid)
Reply
#10

trust me,i dont have them defined..i check 2 times..like an anti-virus..no price defined..

PS:and no GetVehiclePrice(vehicleid)..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)