Need help, file check -
HondaCBR - 31.12.2011
Hi, Im using car system on my server and the cars are saved as 1.cfg 2.cfg 3.cfg and so on, and in each of those config files we get:
pawn Код:
Spawned=0
Locked=1
Owner=JohnTraVo
ModelID=560
X=820.347595
Y=-1327.753784
Z=13.110036
A=344.097412
Health=472.898742
Panels=35717153
Doors=516
Lights=5
Tires=0
Color1=92
Color2=39
Paintjob=1
SPOILER=1138
HOOD=-1
ROOF=1032
SIDESKIRT=1026
LAMPS=-1
NITRO=1010
EXHAUST=1029
WHEELS=1079
STEREO=1086
HYDRAULICS=1087
FRONT_BUMPER=1169
REAR_BUMPER=1141
VENT_RIGHT=-1
VENT_LEFT=-1
How can i perform a check so when you type /v you will see a dialog showing all the cars with your name next to owner=, basically every car file needs to be checked. In that Cars folder there are only car files.
I can do the dialog I just need code for checking which car is yours.This is a part of the code related to the file:
pawn Код:
new name[24];
new CarFile[35];
GetPlayerName(playerid,name,24);
format(CarFile,sizeof(CarFile),"Auta/%d.ini",vUID);
if(dini_Exists(CarFile) == 1)
{
if(strcmp(name,dini_Get(CarFile,"Owner"),true) == 0)
{
if(dini_Int(CarFile,"Spawned") == 0)
{
if(Car[playerid][Spawned] == false)
{
if(IsVehicleInUse(Car[playerid][VehicleGameID]) == 0)
{
Car[playerid][VehicleGameID] = CreateVehicle(dini_Int(CarFile,"ModelID"),dini_Float(CarFile,"X"),dini_Float(CarFile,"Y"),dini_Float(CarFile,"Z"),dini_Float(CarFile,"A"),dini_Int(CarFile,"Color1"),dini_Int(CarFile,"Color2"),-1);
ChangeVehiclePaintjob(Car[playerid][VehicleGameID],dini_Int(CarFile,"Paintjob"));
SetVehicleHealth(Car[playerid][VehicleGameID],dini_Float(CarFile,"Health"));
Re: Need help, file check -
coole210 - 31.12.2011
There is a way to do this but it will cause MAJOR server lag, the only way to do a clean check is on Y_INI (I believe) and MySQL
Re: Need help, file check -
HondaCBR - 31.12.2011
:/ i don't want to use MySQL as its too complicated, is there really no one of doing it this way?
maybe someone has a code for mysql car saving loading etc, basically car ownership system?
Re: Need help, file check -
§с†¶e®РµРe - 31.12.2011
Check out v Dealer.its dynamic also and it is really advanced..for a roleplay server its the best according to me
Re: Need help, file check -
HondaCBR - 31.12.2011
Don't reply to this with"Use Search Button" I did, I looked for v Dealer, vehicle Dealer, I looke in ****** too and cant find it, so if someone has a link I would appreciate it.
Re: Need help, file check -
§с†¶e®РµРe - 31.12.2011
I am not telling u to use search button.vdealer is a fs+inc.
Heres the link-https://sampforum.blast.hk/showthread.php?tid=254251&highlight=vDealer