Unused cars / rep +1
#5

Code:
CMD:rac(playerid, params[])
{
	if(!IsAdmin(playerid, 1)) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
	new bool:vehicleused[MAX_VEHICLES];
	for(new i=0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
		{
			vehicleused[GetPlayerVehicleID(i)] = true;
		}
	}
	for(new i=1; i < MAX_VEHICLES; i++)
	{
		if(!vehicleused[i])
		{
			SetVehicleToRespawn(i);
		}
	}
	new msg[128];
	format(msg, sizeof(msg), "Admin %s (%d) has respawned all unused vehicles", PlayerName(playerid), playerid);
	SendClientMessageToAll(COLOR_YELLOW, msg);
	return 1;
}
Reply


Messages In This Thread
Unused cars / rep +1 - by arcade2705 - 02.01.2012, 14:12
Re: Unused cars / rep +1 - by Syntax - 02.01.2012, 14:13
Re: Unused cars / rep +1 - by arcade2705 - 02.01.2012, 14:33
Re: Unused cars / rep +1 - by Leo_Johnson - 02.01.2012, 14:39
Re: Unused cars / rep +1 - by Leo_Johnson - 02.01.2012, 14:42

Forum Jump:


Users browsing this thread: 2 Guest(s)