Hello Friends,
I am newbie in scripting.My friends helped me in adding vehicles in server using /cveh command. But they have changed the costs of vehicles.I mean , I added a PCJ with 350000 cost while my friends added the pcj's on different costs. I am trying to create a function to auto update cost of same model of vehicles using that function in " OnScriptLoad " function. Can anybody help me.
I am newbie in scripting.My friends helped me in adding vehicles in server using /cveh command. But they have changed the costs of vehicles.I mean , I added a PCJ with 350000 cost while my friends added the pcj's on different costs. I am trying to create a function to auto update cost of same model of vehicles using that function in " OnScriptLoad " function. Can anybody help me.
Code Select
function updatec(vehicle)
{
local veh = QuerySQL( Vehicles,"SELECT FROM Sale WHERE Model='"+Vehicle.Model+"'"); ;
QuerySQL( Vehicles,"UPDATE Sale SET Cost='"+Price+"' WHERE Model='"+Vehicle.Model+"'");
if( veh.Model == 191) return "350000";
else if(veh == 232) return "450000"; //hotring
}