Hello Last time Kakan say u didn't made any snippet :( but i want to release one of them Its is almost maden by me but Mashreq help me in Query
Creater: Shawn
Helper: Mashreq
Well it works perfect in Vccnr but u can even change and add your query if u are using any other script
Add it on Commands
if(cmd=="vhm")
{
//your admin level function
else if ( !text) MessagePlayer( "/vhm <Vehicle-Model>.", player );
else if ( VhmActive == true ) MessagePlayer( "Vehicle Minute is already active.", player );
{
local q = QuerySQL( db, "SELECT Cost,Name FROM VehicleCost WHERE rowid LIKE '"+text+"'");
local Cost = QuerySQL( db, "SELECT Cost FROM VehicleCost WHERE rowid LIKE '"+text+"'");
Message("Happy one minute has started!");
NewTimer( "stop",60000, 1, text );
local changing= QuerySQL( db, "UPDATE VehicleCost SET Cost='10000' WHERE Name='" + text + "'" ); // add your one if not similiar
EchoMessage( ICOL_RED + "Happy one minute for car started." );
VhmActive = true
Message("[#FF0000]Vehicle "+text+" [#FFF000]is now for just 000 hurry up before it [#FFFFFF]expires, the offer is available for only one minute!");
FreeSQLQuery(changing);
}
}
Functions....
function stop(text)
{
local restoring = QuerySQL( db, "UPDATE VehicleCost SET Cost='900000' WHERE Name='" + text + "'" ); // your query
Message( "[#FF0000]Vehicle " + text + " Ammount has been exceeded" );
VhmActive= false;
FreeSQLQuery(restoring);
}
on Main.nut ...
onScriptLoad()
{
VhmActive <- false;
}
And Functions Again....
Enjoy if don't work Pm me ;)
Code Updated .. Thanks Beztone
hahahahhahah nice
Thanks
Lol Who say yoiu for Do 5 time if one is not end and its for admin i have say their add your admin level function
Code is Updated Please see first post
Why do you query the same thing twice without freeing the results? This could easily result in an memory leak...
Quote from: Thijn on Jul 22, 2015, 05:49 AM... This could easily result in an memory leak...
It is a memory leak. No need to be polite about it :P
Sorry Code Updated Thanks Beztone