Forsale

Started by Finch, Apr 19, 2015, 06:49 AM

Previous topic - Next topic

Finch

My forsale system  not working when i do /forsale it say total cars 0 rc 0 bikes 0 etc 0
this is command and whole function

function Start()
{
    try{
local a = 1;
while( a <= GetVehicleCount() )
{
QuerySQL( sqliteDB, "UPDATE Cars SET Owner='Vice-City' WHERE ID='" + a + "'" );
a ++;
}
}
catch(e) print( "lol: " + e );

}

function Cars()
{
local a = 1, MaxCars = GetVehicleCount();
while ( a <= MaxCars )
{
local veh = FindVehicle( a );
if ( veh )
{
QuerySQL( sqliteDB, "REPLACE INTO Cars ( ID, Cost, Owner, Shared ) VALUES ( '" + veh.ID + "', '100000', 'Vice-City', 'None' )" );
}
a ++;
}
}

function ForsaleCars()
{local a = 1, b = 0;
while ( a <= GetVehicleCount() )
{local q = QuerySQL( sqliteDB, "SELECT * FROM Cars WHERE ID='" + a.tointeger() + "'" );
if ( GetSQLColumnData( q, 2 ) == "Vice-City" )
{b++;
local veh = FindVehicle( a.tointeger() );
local vehicle = GetVehicleType( veh.Model );
if ( vehicle == "Car" ) Car++;
else if ( vehicle == "Plane" ) Plane++;
else if ( vehicle == "Boat" ) Boat++;
else if ( vehicle == "RC" ) RC++;
else if ( vehicle == "Bike" ) Bike++;
else if ( vehicle == "Heli" ) Heli++;
}
a++;
}
return b;
}
function GetVehicleType( model ) {
// Returns: Car / Bike / Heli / Plane / Boat / RC
switch ( model ) {
case 136:
case 160:
case 176:
case 182:
case 183:
case 184:
case 190:
case 202:
case 203:
case 214:
case 223:
return "Boat";
break;
case 155:
case 165:
case 217:
case 218:
case 227:
return "Heli";
break;
case 166:
case 178:
case 191:
case 192:
case 193:
case 198:
return "Bike";
break;
case 171:
case 194:
case 195:
case 231:
return "RC";
break;
case 180:
case 181:
return "Plane";
break;
default:
return "Car";
break;
}
}

function PlayerCars( player )
{
local a = 1, b = 0;
while ( a <= GetVehicleCount() )
{
if ( CarOwner( a ).tolower() == player.Name.tolower() )
{
b ++;
}
a ++;
}
return b;
}


Command

else if ( cmd == "forsale" )
{
Message( "Total Vehicles: " + ForsaleCars() + "." );
Message( "Cars: " + Car + ", Bikes: " + Bike + ", Planes: " + Plane + ", RC: " + RC + ", Boats: " + Boat + ", Helis: " + Heli + "." );
Empty();
}

and on scriptload

Car <- 0;
   Bike <- 0;
   RC <- 0;
    Plane <- 0;
   Boat <- 0;
   Heli <- 0;
Beztone is a scripter but he is too stupid

DizzasTeR

For all the admins and moderators  stop fooling around with your self and please consider this post wisely. This guy Finch first time started to make help topics without code, and alot of guys hardly got him to get going... Now as an excuse he just posts a bunch of stupid code...

seriously why? Why doesn't he post a screen shot? If you have noticed his last two or three topics, he poated the same way and no screen, when i took out his mistakes, he just locked the topic, what does this mean? This means that he got no problems, he just himself ruins the code and then posts it here, after we all here take out the mistakes, he just replaces back the working cmd from wherever the hell script he got.

Kindly take a step on this, he is just trying to increase his forum stats, he can script nothing, he comes to random servers and ask for scripts he will surely rage on me but atleast understand what I said, he got no problems, he got a working script from who knows where, copy a bunch of code, troll with it and make it bugged then ask for help here.

Even after this none understand this stupidity, I got nothing else to say.

Stormeus

Quote from: Doom_Killer on Apr 19, 2015, 08:28 AMKindly take a step on this, he is just trying to increase his forum stats

I would consider this a problem if there were any reason to care about someone's post count.

DizzasTeR

Quote from: stormeus on Apr 19, 2015, 08:40 AM
Quote from: Doom_Killer on Apr 19, 2015, 08:28 AMKindly take a step on this, he is just trying to increase his forum stats

I would consider this a problem if there were any reason to care about someone's post count.

More over he is just consistently spamming in an indirect way, as I said, if still this situation can't be understood then fine.

Stormeus

Quote from: Doom_Killer on Apr 19, 2015, 08:44 AM
Quote from: stormeus on Apr 19, 2015, 08:40 AM
Quote from: Doom_Killer on Apr 19, 2015, 08:28 AMKindly take a step on this, he is just trying to increase his forum stats

I would consider this a problem if there were any reason to care about someone's post count.

More over he is just consistently spamming in an indirect way, as I said, if still this situation can't be understood then fine.

I'll leave that up to the moderators to decide.

And by moderators I mean @Thijn

Finch

Doom Killer stfu i dont want to increase my post
This is my final topic on this forum this is last bug of my script i just want your help so
Please...
Beztone is a scripter but he is too stupid

DizzasTeR

Here is your answer:

QuerySQL( sqliteDB, "UPDATE Cars SET Owner='Vice-City' WHERE ID='" + a + "'" );
Quote from: Finch on Apr 19, 2015, 12:53 PMDoom Killer stfu i dont want to increase my post
This is my final topic on this forum this is last bug of my script i just want your help so
Please...

You said that pretty much already, also wasted 2 accounts on it, so what now you're gonna create a new account? Geez

Sk

Agree with @Doom_Killer
not in his intention of increasing post because who cares about increasing post here this is a helping forum not increasingyourposttobecometester etc.
but i do agree with doom that he really is up to something.
something not good like he is trying to destroy this community with his shitty topic and shitty questions. his questions and errors are very small and they does not help anyone else but his code is not basic he has someone's very advance script (or almost advance) so moderators should look into it.

Finch

i dont wanna make any other account i just want help in this system
Beztone is a scripter but he is too stupid

Honey

Quote from: Finch on Apr 19, 2015, 02:32 PMi dont wanna make any other account i just want help in this system

Before You start asking to for help You must read the wiki and the scripts, I don't know how you get scripts like those but Don't mate, It's really going to affect ya, Just read the wiki for help and incase you're not familiar with the parameters goto this old site which may be able to help you. You should stop copying other scripts & make something out of your own god-gifted hands soon or the Ban Hammer will hit your as* very soon. Goodluck