How could I make a command to reset a car km?
#1

How could I make a command to reset a car km?

Parameter for km "vVechime"

It was supposed to do to somehow reset km in the vehicles and then km
http://imgur.com/shWT7ju
Reply
#2

uppppp
Reply
#3

"UPDATE `table` SET `vVechime` = `0` WHERE `vehicle_field` = `%i`", vehicleid
Reply
#4

and further?
Reply
#5

Код:
CMD:resetveh(playerid, params[])
{
	new 
		id;

	if (sscanf(params, "i", id))
		return SendClientMessage(playerid, -1, "/resetveh vehid");


	mysql_format(g_SQL, Query, sizeof (Query), "UPDATE `table` SET `vVechime` = `0` WHERE `vehicle_field` = `%i`", id);
	mysql_tquery(g_SQL, Query);

	return 1;
}
Replace "table" with your table name, and "vehicle_field" with your vehicle id or whatever that is unique.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)