Respawn cars CMD help
#1

Howdy, everyone. This is my Car Respawn command:
Код:
CMD:respawncars(playerid, params[])
{
	if (PlayerInfo[playerid][pAdmin] >= 2)
	{
		new string[128], radius;
		if(sscanf(params, "d", radius)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /respawncars [radius]");

		if(radius < 1 || radius > 999999)
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "Radius must be higher than 0 and lower than 999999!");
			return 1;
		}
		RespawnNearbyVehicles(playerid, radius);
		format(string, sizeof(string), "You have respawned all vehicles within a radius of %d.", radius);
		SendClientMessageEx(playerid, COLOR_GREY, string);
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
	}
	return 1;
}
The only problem is that it respawns EVERY cars even if there is someone driving it... I want it to respawn only cars that aren't being used, how could I do that? Thanks in advance!
Reply


Messages In This Thread
Respawn cars CMD help - by DuarteCambra - 23.03.2013, 00:08
Re : Respawn cars CMD help - by thegreathom - 23.03.2013, 00:22
Respuesta: Re : Respawn cars CMD help - by DuarteCambra - 23.03.2013, 00:26
Re: Respawn cars CMD help - by PaulDinam - 23.03.2013, 00:27
Re : Respawn cars CMD help - by thegreathom - 23.03.2013, 00:31
Respuesta: Re: Respawn cars CMD help - by DuarteCambra - 23.03.2013, 00:31
Re: Respawn cars CMD help - by PaulDinam - 23.03.2013, 01:14
Re : Respawn cars CMD help - by thegreathom - 23.03.2013, 01:17
Respuesta: Respawn cars CMD help - by DuarteCambra - 23.03.2013, 01:18
Re: Respawn cars CMD help - by faff - 23.03.2013, 01:20

Forum Jump:


Users browsing this thread: 1 Guest(s)