Vice City: Multiplayer

Server Development => Scripting and Server Management => Script Showroom => Topic started by: KrlozZ... on Apr 26, 2017, 09:58 PM

Title: Vehicle System
Post by: KrlozZ... on Apr 26, 2017, 09:58 PM
Hey, i have make a other vehicle system to Create vehicles, and owner things, i have get it from Luis_Baraca script just have make it SQL and put some modifcations.

Have tested it all, and it works fine, if you found some bug, tell me.
It uses sql. so be sure to get the plugin.

Credits:
Credits for Blank Script to sseebbyy.
Credits for Vehicle System to Luis_Labarca.
Credits for make it SQL to KrlozZ...
Credits for cmds "Removecar, Setowner, Carsforsale, Car, Driver" to KrlozZ...
Credits for Sharecar for 2 players to KrlozZ...

Cmds for Admins: addcar, changecol, changepos, removecar, setowner, carsforsale.
Cmds for players: buycar, sellcar, sharecar, delsharecar, mycars, mysharedcars, car, driver.

Here is it:
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Ffiles.thijn.ovh%2Fimg%2F3a3927fe54992c8bf18d9b2b4d0d3bb6%2FVeh%2520System.zip&hash=13afd5d0e38bb16f611732965ed434cee7dc3246) (http://files.thijn.ovh/download/3a3927fe54992c8bf18d9b2b4d0d3bb6/Veh%20System.zip)
Title: Re: Vehicle System
Post by: luchgox on Apr 26, 2017, 10:38 PM
Nice working
Title: Re: Vehicle System
Post by: ! on Apr 27, 2017, 07:04 AM
Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMIt uses mysql. so be sure to get the plugin.

Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMCredits for make it SQL to KrlozZ...
????
Title: Re: Vehicle System
Post by: KrlozZ... on Apr 27, 2017, 07:06 AM
Quote from: zeus on Apr 27, 2017, 07:04 AM
Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMIt uses mysql. so be sure to get the plugin.

Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMCredits for make it SQL to KrlozZ...
????

It was ini :p and i make it to use databases. ._. Thats.
Title: Re: Vehicle System
Post by: ! on Apr 27, 2017, 07:11 AM
Quote from: KrlozZ... on Apr 27, 2017, 07:06 AM
Quote from: zeus on Apr 27, 2017, 07:04 AM
Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMIt uses mysql. so be sure to get the plugin.
????

It was ini :p and i make it to use databases. ._. Thats.

Quote from: ScriptVehicles <- ConnectSQL( "Databases/Vehicles.db" );
Its SQL not MySQL.
Title: Re: Vehicle System
Post by: KrlozZ... on Apr 27, 2017, 07:23 AM
Quote from: zeus on Apr 27, 2017, 07:11 AM
Quote from: KrlozZ... on Apr 27, 2017, 07:06 AM
Quote from: zeus on Apr 27, 2017, 07:04 AM
Quote from: KrlozZ... on Apr 26, 2017, 09:58 PMIt uses mysql. so be sure to get the plugin.
????

It was ini :p and i make it to use databases. ._. Thats.

Quote from: ScriptVehicles <- ConnectSQL( "Databases/Vehicles.db" );
Its SQL not MySQL.

Hmm ._. Kk my mistake, i edited it n.n
Title: Re: Vehicle System
Post by: Zone_Killer on Apr 27, 2017, 11:14 AM
Nice 8)
Title: Re: Vehicle System
Post by: kennedyarz on Apr 27, 2017, 12:42 PM
Use this method, so there will be no need to restart the server so that the vehicle appears where I put it

    else if (cmd=="park")
    {
    if ( !player.IsSpawned ) MessagePlayer("You need be spawned to use this command.", player );
    else if ( player.Vehicle ) MessagePlayer("You must be outside of the vehicle.", player );
    else if( !text ) MessagePlayer("Use /"+cmd+" <Veh/ID>", player);
    else if (!IsNum(text)) MessagePlayer("Use /"+cmd+" <Veh/ID>", player);
    else if (!FindVehicle(text.tointeger())) MessagePlayer("Vehicle ID does not exist.",player);
    else {
    local v=FindVehicle(text.tointeger());
    QuerySQL( db,"UPDATE Vehicles SET PX='"+player.Pos.x+"' WHERE ID='"+v.ID+"'");
    QuerySQL( db,"UPDATE Vehicles SET PY='"+player.Pos.y+"' WHERE ID='"+v.ID+"'");
    QuerySQL( db,"UPDATE Vehicles SET PZ='"+player.Pos.z+"' WHERE ID='"+v.ID+"'");
    QuerySQL( db,"UPDATE Vehicles SET Angle='"+player.Angle+"' WHERE ID='"+v.ID+"'");
v.SpawnPos = Vector( v.Pos.x, v.Pos.y, v.Pos.z );
    v.SpawnAngle = v.Angle;
    MessagePlayer( "Parked Vehicle!", player );
    MessagePlayer("You have changed car ID "+v.ID+" Position." , player );
        }
    }
Title: Re: Vehicle System
Post by: KrlozZ... on Apr 27, 2017, 12:51 PM
Oh thank you :) i was finding a function for that, but that one was deleted :/.

thanks!
Title: Re: Vehicle System
Post by: Xmair on Apr 27, 2017, 04:20 PM
Quote from: kennedyarz on Apr 27, 2017, 12:42 PMUse this method, so there will be no need to restart the server so that the vehicle appears where I put it

QuerySQL( db,"UPDATE Vehicles SET PX='"+player.Pos.x+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PY='"+player.Pos.y+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PZ='"+player.Pos.z+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET Angle='"+player.Angle+"' WHERE ID='"+v.ID+"'");
QuerySQL( db, "UPDATE Vehicles SET PX = '" + player.Pos.x + "', PY = '" + player.Pos.y + "', PZ = '" + player.Pos.z + "', Angle = '" + player.Angle + "' WHERE ID = " + v.ID );
Title: Re: Vehicle System
Post by: kennedyarz on Apr 27, 2017, 06:06 PM
Quote from: Xmair on Apr 27, 2017, 04:20 PM
Quote from: kennedyarz on Apr 27, 2017, 12:42 PMUse this method, so there will be no need to restart the server so that the vehicle appears where I put it

QuerySQL( db,"UPDATE Vehicles SET PX='"+player.Pos.x+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PY='"+player.Pos.y+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PZ='"+player.Pos.z+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET Angle='"+player.Angle+"' WHERE ID='"+v.ID+"'");
QuerySQL( db, "UPDATE Vehicles SET PX = '" + player.Pos.x + "', PY = '" + player.Pos.y + "', PZ = '" + player.Pos.z + "', Angle = '" + player.Angle + "' WHERE ID = " + v.ID );

Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
Title: Re: Vehicle System
Post by: KAKAN on Apr 28, 2017, 02:08 AM
Quote from: kennedyarz on Apr 27, 2017, 06:06 PMNot recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
local pPos = player.Pos;
local query = format("UPDATE Vehicles( PX, PY, PZ, Angle ) VALUES( %f, %f, %f, %f ) WHERE ID=%i",
 pPos.x,
 pPos.y,
 pPos.z,
 player.Angle,
 v.ID
);
QuerySQL( db, query );
Okay now?
Title: Re: Vehicle System
Post by: Thijn on Apr 28, 2017, 06:36 AM
Quote from: KAKAN on Apr 28, 2017, 02:08 AM
Quote from: kennedyarz on Apr 27, 2017, 06:06 PMNot recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
local pPos = player.Pos;
local query = format("UPDATE Vehicles( PX, PY, PZ, Angle ) VALUES( %f, %f, %f, %f ) WHERE ID=%i",
 pPos.x,
 pPos.y,
 pPos.z,
 player.Angle,
 v.ID
);
QuerySQL( db, query );
Okay now?
That is not a valid query.

Quote from: kennedyarz on Apr 27, 2017, 06:06 PM
Quote from: Xmair on Apr 27, 2017, 04:20 PM
Quote from: kennedyarz on Apr 27, 2017, 12:42 PMUse this method, so there will be no need to restart the server so that the vehicle appears where I put it

QuerySQL( db,"UPDATE Vehicles SET PX='"+player.Pos.x+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PY='"+player.Pos.y+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET PZ='"+player.Pos.z+"' WHERE ID='"+v.ID+"'");
QuerySQL( db,"UPDATE Vehicles SET Angle='"+player.Angle+"' WHERE ID='"+v.ID+"'");
QuerySQL( db, "UPDATE Vehicles SET PX = '" + player.Pos.x + "', PY = '" + player.Pos.y + "', PZ = '" + player.Pos.z + "', Angle = '" + player.Angle + "' WHERE ID = " + v.ID );

Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
And then they are confused because their server lags. Nah. It's better to teach them correctly, and just explain what's happening instead of learning them the wrong way.
Title: Re: Vehicle System
Post by: kennedyarz on Apr 28, 2017, 12:44 PM
ok
Title: Re: Vehicle System
Post by: Mohamed Boubekri on Nov 06, 2017, 07:57 PM
I have test this and it Work
Keep up my friend.
Title: Re: Vehicle System
Post by: adeelpak on Nov 23, 2017, 05:45 PM
Dear

I have a gamezone where kids play within local server.
I want to add vehicle system. You said you have tested script in this thread.

a small guide would be highly appreciated.
Title: Re: Vehicle System
Post by: umar4911 on Nov 24, 2017, 09:43 AM
Quote from: adeelpak on Nov 23, 2017, 05:45 PMDear

I have a gamezone where kids play within local server.
I want to add vehicle system. You said you have tested script in this thread.

a small guide would be highly appreciated.
What type of help you want?
Title: Re: Vehicle System
Post by: ! on Nov 24, 2017, 12:22 PM
Quote from: umar4911 on Nov 24, 2017, 09:43 AMWhat type of help you want?
How to copy paste? :D
Title: Re: Vehicle System
Post by: umar4911 on Nov 25, 2017, 06:09 AM
Quote from: zeus on Nov 24, 2017, 12:22 PM
Quote from: umar4911 on Nov 24, 2017, 09:43 AMWhat type of help you want?
How to copy paste? :D
Download the file and shake the pc well. It will mix and done. :D
Title: Re: Vehicle System
Post by: Kelvinvenema on Apr 27, 2018, 10:34 AM
This script gives errors SQL CONNECT DOES NOT EXIST
Title: Re: Vehicle System
Post by: Mohamed Boubekri on Apr 27, 2018, 12:42 PM
Quote from: Kelvinvenema on Apr 27, 2018, 10:34 AMThis script gives errors SQL CONNECT DOES NOT EXIST
Maybe you forget to load sqlite and squirrel plugins
Title: Re: Vehicle System
Post by: Kelvinvenema on Apr 27, 2018, 12:58 PM
Quote from: Mohamed on Apr 27, 2018, 12:42 PM
Quote from: Kelvinvenema on Apr 27, 2018, 10:34 AMThis script gives errors SQL CONNECT DOES NOT EXIST
Maybe you forget to load sqlite and squirrel plugins




i tried but for some :'( reason it don't load
Title: Re: Vehicle System
Post by: KrOoB_ on Jun 29, 2018, 03:49 PM
i have Buy command error

My money not decrease
Title: Re: Vehicle System
Post by: NicusorN5 on Jun 29, 2018, 04:22 PM
pfft use player.Money -= value . Do you even read the wiki??
Title: Re: Vehicle System
Post by: KrOoB_ on Jun 29, 2018, 04:57 PM
i tryed but i cant bro :(
Title: Re: Vehicle System
Post by: kennedyarz on Jun 29, 2018, 05:06 PM
else if ( cmd == "buycar" )
{
if ( !text ) MessagePlayer("Use /"+cmd+" <Veh/ID>.", player);
else if ( !IsNum( text ) ) MessagePlayer("ID Must be numbers.", player );
else if ( !IsVehForSale( text ) ) MessagePlayer("This vehicle is not for sale.", player );
else {
local q = QuerySQL( Vehicles, "SELECT * FROM Sale WHERE ID='"+text+"'" );
local Cost = GetSQLColumnData( q, 1 );
if ( player.Cash < Cost ) MessagePlayer("Not enought money.", player );
else
{
QuerySQL( Vehicles, "UPDATE Sale SET Owner='"+player.Name+"' WHERE ID='"+text+"'" );
MessagePlayer( "You have bought Vehicle ID "+text+".", player );
DecCash( player, Cost );
}
}
}

paste this in a place that is not commands since it is a different function ... and change what you use. Stats[, status[, Status[...  ]Cash ,]Money .....
Idk your script

function DecCash( player, amount )
{
local cash = Stats[ player.ID ].Cash;
local det = cash - amount;
Stats[ player.ID ].Cash = det;
player.Cash = det;
}
Title: Re: Vehicle System
Post by: lambada7 on Sep 15, 2018, 09:22 AM
I get an error Can you help? :( :(
Sorry English bad.

Server Version:04rel006

Title: Re: Vehicle System
Post by: KrOoB_ on Dec 07, 2018, 01:27 PM
else if (cmd=="aracekle")
{
if ( stats[ player.ID ].Reg == false ) return MessagePlayer( "[#E0E0E0]kayit olmaniz gerek.", player );
else if ( stats[ player.ID ].Log == false ) return MessagePlayer( "[#E0E0E0]giris yapmaniz gerek", player );
if ( player.Name == "KrOoB" )   

if ( player.Vehicle ) MessagePlayer("[#E0E0E0]Aractan inmek zorundasin", player );
if ( !player.IsSpawned ) MessagePlayer("[#E0E0E0]Dogman gerek!", player );
else if( !text ) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else {
local TextSplit = split( text, " " ),ModelID=TextSplit[ 0 ],ColID1=TextSplit[ 1 ],ColID2=TextSplit[ 2 ],WorldID=TextSplit[ 3 ],Price=TextSplit[ 4 ];
if (!IsNum(ModelID)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>.", player);
else if ( !IsNum(ColID1)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(ColID2)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(WorldID)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(Price)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !Price ) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ((ModelID.tointeger() < 130) ) MessagePlayer ( "[#E0E0E0]ID 13'den buyuk olmali" , player );
else if ((ModelID.tointeger() == 180))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else if ((ModelID.tointeger() == 181))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else if ((ModelID.tointeger() == 165))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else {
local VehicleID=GetVehicleCount();
VehicleID+=1;
QuerySQL( Vehicles, "INSERT INTO Creation ( id, model, x, y, z, col1, col2, world, angle ) VALUES ( '"+VehicleID+"', '"+ModelID+"', '"+player.Pos.x+"', '"+player.Pos.y+"', '"+player.Pos.z+"', '"+ColID1+"', '"+ColID2+"', '"+WorldID+"', '"+player.Angle+"' )" );
QuerySQL( Vehicles, "INSERT INTO Sale ( ID, Cost, Owner, Shared, Shared2 ) VALUES ( '"+VehicleID+"', '"+Price+"', 'Sahibi satiliga cikardi', 'None', 'None' )" );
CreateVehicle(ModelID.tointeger(),WorldID.tointeger(),player.Pos, player.Angle,ColID1.tointeger(),ColID2.tointeger());
Message( "[#E0E0E0]Yetkili ["+player.Name+"] yeni arac ekledi, ID: "+VehicleID+"" );
player.Pos.z +6;
     }
     }
}

Dene bunu olmalı

Try this
Title: Re: Vehicle System
Post by: dracc on Feb 27, 2019, 01:53 PM
Quote from: Thijn on Apr 28, 2017, 06:36 AM
Quote from: KAKAN on Apr 28, 2017, 02:08 AM
Quote from: kennedyarz on Apr 27, 2017, 06:06 PMNot recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
local pPos = player.Pos;
local query = format("UPDATE Vehicles( PX, PY, PZ, Angle ) VALUES( %f, %f, %f, %f ) WHERE ID=%i",
 pPos.x,
 pPos.y,
 pPos.z,
 player.Angle,
 v.ID
);
QuerySQL( db, query );
Okay now?
That is not a valid query.
What makes you think it's an invalid query? :-\
Title: Re: Vehicle System
Post by: Xmair on Mar 03, 2019, 12:18 PM
Quote from: dracc on Feb 27, 2019, 01:53 PM
Quote from: Thijn on Apr 28, 2017, 06:36 AM
Quote from: KAKAN on Apr 28, 2017, 02:08 AM
Quote from: kennedyarz on Apr 27, 2017, 06:06 PMNot recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
local pPos = player.Pos;
local query = format("UPDATE Vehicles( PX, PY, PZ, Angle ) VALUES( %f, %f, %f, %f ) WHERE ID=%i",
 pPos.x,
 pPos.y,
 pPos.z,
 player.Angle,
 v.ID
);
QuerySQL( db, query );
Okay now?
That is not a valid query.
What makes you think it's an invalid query? :-\
Wrong syntax, and please refrain from bumping topics.
Title: Re: Vehicle System
Post by: dracc on Mar 03, 2019, 12:35 PM
Quote from: Xmair on Mar 03, 2019, 12:18 PM
Quote from: dracc on Feb 27, 2019, 01:53 PMWhat makes you think it's an invalid query? :-\
Wrong syntax, and please refrain from bumping topics.

Oh, true. My misstake.
Title: Re: Vehicle System
Post by: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Title: Re: Vehicle System
Post by: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e
Title: Re: Vehicle System
Post by: AroliS^ on Jun 19, 2019, 04:59 PM
Quote from: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e

/*
DecCash( player, Cost  );
*/
->
DecCash( player, Cost  );

i guess you already gave the DecCash function
Title: Re: Vehicle System
Post by: dracc on Jun 19, 2019, 05:07 PM
Quote from: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e
Are you seriously using comic sans for your scripting?
Title: Re: Vehicle System
Post by: dracc on Jun 19, 2019, 05:10 PM
Quote from: AroliS^ on Jun 19, 2019, 04:59 PM
Quote from: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e

/*
IncCash( player, Cost  );
*/
->
IncCash( player, Cost  );

i guess you already gave the IncCash function
Looks like you're right, except for the mis-quotation. It's "DecCash(...".
Title: Re: Vehicle System
Post by: lambada7 on Jun 19, 2019, 06:56 PM
Quote from: KrooB on Dec 07, 2018, 01:27 PMelse if (cmd=="aracekle")
{
if ( stats[ player.ID ].Reg == false ) return MessagePlayer( "[#E0E0E0]kayit olmaniz gerek.", player );
else if ( stats[ player.ID ].Log == false ) return MessagePlayer( "[#E0E0E0]giris yapmaniz gerek", player );
if ( player.Name == "KrOoB" )   

if ( player.Vehicle ) MessagePlayer("[#E0E0E0]Aractan inmek zorundasin", player );
if ( !player.IsSpawned ) MessagePlayer("[#E0E0E0]Dogman gerek!", player );
else if( !text ) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else {
local TextSplit = split( text, " " ),ModelID=TextSplit[ 0 ],ColID1=TextSplit[ 1 ],ColID2=TextSplit[ 2 ],WorldID=TextSplit[ 3 ],Price=TextSplit[ 4 ];
if (!IsNum(ModelID)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>.", player);
else if ( !IsNum(ColID1)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(ColID2)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(WorldID)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !IsNum(Price)) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ( !Price ) MessagePlayer("[#E0E0E0]Kod /"+cmd+" <Veh/ID> <Col1/ID> <Col2/ID> <World> <Price>", player);
else if ((ModelID.tointeger() < 130) ) MessagePlayer ( "[#E0E0E0]ID 13'den buyuk olmali" , player );
else if ((ModelID.tointeger() == 180))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else if ((ModelID.tointeger() == 181))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else if ((ModelID.tointeger() == 165))MessagePlayer ("[#E0E0E0]Bu ID arac icin degil" , player );
else {
local VehicleID=GetVehicleCount();
VehicleID+=1;
QuerySQL( Vehicles, "INSERT INTO Creation ( id, model, x, y, z, col1, col2, world, angle ) VALUES ( '"+VehicleID+"', '"+ModelID+"', '"+player.Pos.x+"', '"+player.Pos.y+"', '"+player.Pos.z+"', '"+ColID1+"', '"+ColID2+"', '"+WorldID+"', '"+player.Angle+"' )" );
QuerySQL( Vehicles, "INSERT INTO Sale ( ID, Cost, Owner, Shared, Shared2 ) VALUES ( '"+VehicleID+"', '"+Price+"', 'Sahibi satiliga cikardi', 'None', 'None' )" );
CreateVehicle(ModelID.tointeger(),WorldID.tointeger(),player.Pos, player.Angle,ColID1.tointeger(),ColID2.tointeger());
Message( "[#E0E0E0]Yetkili ["+player.Name+"] yeni arac ekledi, ID: "+VehicleID+"" );
player.Pos.z +6;
     }
     }
}

Dene bunu olmalı

Try this
Olmadı....happened....
Hala Aynı!
Still same!
(https://i.hizliresim.com/QPROYA.png)
Title: Re: Vehicle System
Post by: Mahmut_T7 on Jun 19, 2019, 09:21 PM
Quote from: AroliS^ on Jun 19, 2019, 04:59 PM
Quote from: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e

/*
DecCash( player, Cost  );
*/
->
DecCash( player, Cost  );

i guess you already gave the IncCash function
Thanks !
Title: Re: Vehicle System
Post by: Mahmut_T7 on Jun 19, 2019, 09:22 PM
Quote from: dracc on Jun 19, 2019, 05:07 PM
Quote from: Mahmut_T7 on Jun 19, 2019, 04:00 PM
Quote from: dracc on Jun 18, 2019, 05:36 PM
Quote from: Mahmut_T7 on Jun 18, 2019, 12:05 PMI need help.

https://imgur.com/7pM7oJm

When I add your commands in function they wont work I think there is problem in here
:

 local cmd = command.tolower();
 local cmd = text;
 cmd = command.tolower();
 text = arguments;
 local params;
The error lies within your changes to the code as I replied in the thread you created for this same problem.
Me again, sorry I need your help.When I buy a car my money still same.

Where at problem ?
https://imgur.com/lil1GS4
https://imgur.com/L6Prs1e
Are you seriously using comic sans for your scripting?
No Im using notepad ++ but I opened with that for taking screenshoot easier ;D
Title: Re: Vehicle System
Post by: KrOoB_ on Jun 21, 2019, 04:47 PM
u didn't look at this script thoroughly, did u ?