Vice City: Multiplayer

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

Title: Vehicle System
Post by: KrlozZ... on April 26th, 2017, 10: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:
(http://files.thijn.ovh/img/3a3927fe54992c8bf18d9b2b4d0d3bb6/Veh System.zip)(http://files.thijn.ovh/download/3a3927fe54992c8bf18d9b2b4d0d3bb6/Veh System.zip)
Title: Re: Vehicle System
Post by: luchgox on April 26th, 2017, 11:38 PM
Nice working
Title: Re: Vehicle System
Post by: ! on April 27th, 2017, 08:04 AM
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
It uses mysql. so be sure to get the plugin.
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
Credits for make it SQL to KrlozZ...
????
Title: Re: Vehicle System
Post by: KrlozZ... on April 27th, 2017, 08:06 AM
Quote from zeus on April 27th, 2017, 08:04 AM
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
It uses mysql. so be sure to get the plugin.
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
Credits 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 April 27th, 2017, 08:11 AM
Quote from KrlozZ... on April 27th, 2017, 08:06 AM
Quote from zeus on April 27th, 2017, 08:04 AM
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
It uses mysql. so be sure to get the plugin.
????
It was ini :p and i make it to use databases. ._. Thats.
Quote from Script
Vehicles <- ConnectSQL( "Databases/Vehicles.db" );
Its SQL not MySQL.
Title: Re: Vehicle System
Post by: KrlozZ... on April 27th, 2017, 08:23 AM
Quote from zeus on April 27th, 2017, 08:11 AM
Quote from KrlozZ... on April 27th, 2017, 08:06 AM
Quote from zeus on April 27th, 2017, 08:04 AM
Quote from KrlozZ... on April 26th, 2017, 10:58 PM
It uses mysql. so be sure to get the plugin.
????
It was ini :p and i make it to use databases. ._. Thats.
Quote from Script
Vehicles <- 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 April 27th, 2017, 12:14 PM
Nice 8)
Title: Re: Vehicle System
Post by: kennedyarz on April 27th, 2017, 01:42 PM
Use this method, so there will be no need to restart the server so that the vehicle appears where I put it

Code: [Select]
    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 April 27th, 2017, 01: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 April 27th, 2017, 05:20 PM
Quote from kennedyarz on April 27th, 2017, 01:42 PM
Use this method, so there will be no need to restart the server so that the vehicle appears where I put it

Code: [Select]
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+"'");
Code: [Select]
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 April 27th, 2017, 07:06 PM
Quote from Xmair on April 27th, 2017, 05:20 PM
Quote from kennedyarz on April 27th, 2017, 01:42 PM
Use this method, so there will be no need to restart the server so that the vehicle appears where I put it

Code: [Select]
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+"'");
Code: [Select]
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 April 28th, 2017, 03:08 AM
Quote from kennedyarz on April 27th, 2017, 07:06 PM
Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
Code: [Select]
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 April 28th, 2017, 07:36 AM
Quote from KAKAN on April 28th, 2017, 03:08 AM
Quote from kennedyarz on April 27th, 2017, 07:06 PM
Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
Code: [Select]
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 April 27th, 2017, 07:06 PM
Quote from Xmair on April 27th, 2017, 05:20 PM
Quote from kennedyarz on April 27th, 2017, 01:42 PM
Use this method, so there will be no need to restart the server so that the vehicle appears where I put it

Code: [Select]
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+"'");
Code: [Select]
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 April 28th, 2017, 01:44 PM
ok
Title: Re: Vehicle System
Post by: Mohamed on November 6th, 2017, 07:57 PM
I have test this and it Work
Keep up my friend.
Title: Re: Vehicle System
Post by: adeelpak on November 23rd, 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 November 24th, 2017, 09:43 AM
Quote from adeelpak on November 23rd, 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.
What type of help you want?
Title: Re: Vehicle System
Post by: ! on November 24th, 2017, 12:22 PM
Quote from umar4911 on November 24th, 2017, 09:43 AM
What type of help you want?
How to copy paste? :D
Title: Re: Vehicle System
Post by: umar4911 on November 25th, 2017, 06:09 AM
Quote from zeus on November 24th, 2017, 12:22 PM
Quote from umar4911 on November 24th, 2017, 09:43 AM
What 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 April 27th, 2018, 11:34 AM
This script gives errors SQL CONNECT DOES NOT EXIST
Title: Re: Vehicle System
Post by: Mohamed on April 27th, 2018, 01:42 PM
Quote from Kelvinvenema on April 27th, 2018, 11:34 AM
This 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 April 27th, 2018, 01:58 PM
Quote from Mohamed on April 27th, 2018, 01:42 PM
Quote from Kelvinvenema on April 27th, 2018, 11:34 AM
This 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 June 29th, 2018, 04:49 PM
i have Buy command error

My money not decrease
Title: Re: Vehicle System
Post by: Athanatos on June 29th, 2018, 05:22 PM
pfft use player.Money -= value . Do you even read the wiki??
Title: Re: Vehicle System
Post by: KrooB on June 29th, 2018, 05:57 PM
i tryed but i cant bro :(
Title: Re: Vehicle System
Post by: kennedyarz on June 29th, 2018, 06:06 PM
Code: [Select]
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

Code: [Select]
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 September 15th, 2018, 10:22 AM
I get an error Can you help? :( :(
Sorry English bad.

Server Version:04rel006

Title: Re: Vehicle System
Post by: KrooB on December 7th, 2018, 01:27 PM
Code: [Select]
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 February 27th, 2019, 01:53 PM
Quote from Thijn on April 28th, 2017, 07:36 AM
Quote from KAKAN on April 28th, 2017, 03:08 AM
Quote from kennedyarz on April 27th, 2017, 07:06 PM
Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
Code: [Select]
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 March 3rd, 2019, 12:18 PM
Quote from dracc on February 27th, 01:53 PM
Quote from Thijn on April 28th, 2017, 07:36 AM
Quote from KAKAN on April 28th, 2017, 03:08 AM
Quote from kennedyarz on April 27th, 2017, 07:06 PM
Not recommended as it confuses the newbie, it is better to do it separate and will see more if he has an error.
Code: [Select]
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 March 3rd, 2019, 12:35 PM
Quote from Xmair on March 3rd, 12:18 PM
Quote from dracc on February 27th, 01:53 PM
What 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 June 18th, 2019, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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 June 19th, 2019, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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 June 19th, 2019, 05:59 PM
Quote from Mahmut_T7 on June 19th, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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
Code: [Select]
/*
DecCash( player, Cost  );
*/
->
DecCash( player, Cost  );

i guess you already gave the DecCash function
Title: Re: Vehicle System
Post by: dracc on June 19th, 2019, 06:07 PM
Quote from Mahmut_T7 on June 19th, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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 June 19th, 2019, 06:10 PM
Quote from AroliS^ on June 19th, 05:59 PM
Quote from Mahmut_T7 on June 19th, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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
Code: [Select]
/*
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 June 19th, 2019, 07:56 PM
Quote from KrooB on December 7th, 2018, 01:27 PM
Code: [Select]
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
Olmadı....happened....
Hala Aynı!
Still same!
(https://i.hizliresim.com/QPROYA.png)
Title: Re: Vehicle System
Post by: Mahmut_T7 on June 19th, 2019, 10:21 PM
Quote from AroliS^ on June 19th, 05:59 PM
Quote from Mahmut_T7 on June 19th, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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
Code: [Select]
/*
DecCash( player, Cost  );
*/
->
DecCash( player, Cost  );

i guess you already gave the IncCash function
Thanks !
Title: Re: Vehicle System
Post by: Mahmut_T7 on June 19th, 2019, 10:22 PM
Quote from dracc on June 19th, 06:07 PM
Quote from Mahmut_T7 on June 19th, 05:00 PM
Quote from dracc on June 18th, 06:36 PM
Quote from Mahmut_T7 on June 18th, 01:05 PM
I 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 June 21st, 2019, 05:47 PM
u didn't look at this script thoroughly, did u ?