Question , fast rep ++ -
buburuzu19 - 07.12.2014
How to lock some vehicles who are loaded from SQL DB?
Re : Question , fast rep ++ -
Z3N0N - 07.12.2014
Mysql update
Код:
UPDATE `Table A`,`Table B`
SET `Table A`.`text`=concat_ws('',`Table A`.`text`,`Table B`.`B-num`," from ",`Table B`.`date`,'/')
WHERE `Table A`.`A-num` = `Table B`.`A-num`
Re: Question , fast rep ++ -
buburuzu19 - 07.12.2014
You don't understand my question.
I mean i added some cars for my dealership , and i want to lock them from my gamemode , cuz in my sql vehicle table don't appears any lock option.
Re: Question , fast rep ++ -
CutX - 07.12.2014
Quote:
Originally Posted by buburuzu19
How to lock some vehicles who are loaded from SQL DB?
|
when creating the vehicle...
pawn Код:
SetVehicleParamsEx(CreateVehicle(/*fill with data from db*/),0,0,0,1,0,0,0);
and that'll lock it right after it's initialisation
Re: Question , fast rep ++ -
buburuzu19 - 07.12.2014
Quote:
Originally Posted by CutX
when creating the vehicle...
pawn Код:
SetVehicleParamsEx(CreateVehicle(/*fill with data from db*/),0,0,0,1,0,0,0);
and that'll lock it right after it's initialisation
|
And where to add that code? OnPlayerConnect?
Re: Question , fast rep ++ -
CutX - 07.12.2014
Quote:
Originally Posted by buburuzu19
And where to add that code? OnPlayerConnect?
|
i said to add it to where you actually load & create the vehicles with data from the db.
it's that part where you query the db and fetch all the vehicle data.
im assuming that creating the veicles using the sql db already works
since you said you only want them to be locked...
Re: Question , fast rep ++ -
buburuzu19 - 07.12.2014
I tried something like this:
SetVehicleParamsEx(337, 0, 0, 0, 1, 0, 0, 0);
Where 337 is vehicleid from SQL DB ( not model id) and 1- locked doors but not working.
I also added the code at on gm init.
Re: Question , fast rep ++ -
buburuzu19 - 07.12.2014
Quote:
Originally Posted by CutX
when creating the vehicle...
pawn Код:
SetVehicleParamsEx(CreateVehicle(/*fill with data from db*/),0,0,0,1,0,0,0);
and that'll lock it right after it's initialisation
|
The vehicles are create in my sql db not in the gamemode