How could I make a command to reset a car km?
#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


Messages In This Thread
How could I make a command to reset a car km? - by Jimmi - 28.07.2015, 13:11
Re: How could I make a command to reset a car km? - by Jimmi - 28.07.2015, 20:15
Re: How could I make a command to reset a car km? - by Evocator - 28.07.2015, 20:36
Re: How could I make a command to reset a car km? - by Jimmi - 28.07.2015, 20:47
Re: How could I make a command to reset a car km? - by Evocator - 28.07.2015, 21:25

Forum Jump:


Users browsing this thread: 1 Guest(s)