Respawn Empty Cars
#1

Hey guys just having a problem with this code when i enter the command it does respawn the cars just it also returns SERVER :UNKOWN COMMAND any ideas?

Код:
if(strcmp(cmd, "/respawncars", true) == 0)
  {
		if (PlayerInfo[playerid][pAdmin] == 0)
		{
			format(string,sizeof(string),"* The Command (%s) Is Unknown, Use '/help' For Commands.",cmdtext);
			SendClientMessage(playerid,COLOR_WHITE, string);
			return 1;
		}
		SendClientMessage(playerid,COLOR_WHITE,"* All Empty Cars Have Been Respawned");
		RespawnEmptyCars();
		return 1;
	}

public RespawnEmptyCars()
{
	for(new d = 0; d < MAX_VEHICLES; d++)
	{
	  if(IsVehicleEmpty(d))
	  {
	    SetVehicleToRespawn(d);
			VehicleInfo[d][gas] = 100;
	    ModVehicle(d);
	  }
	}
}

IsVehicleEmpty(vehicleid)
{
  for(new i = 0, j = GetMaxPlayers(); i < j; i++)
  {
    if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && IsPlayerInVehicle(i,vehicleid)) return false;
  }
  return true;
}
Reply


Messages In This Thread
Respawn Empty Cars - by Beaver07 - 13.10.2009, 16:01
Re: Respawn Empty Cars - by (.Aztec); - 13.10.2009, 16:09
Re: Respawn Empty Cars - by woot - 13.10.2009, 16:11
Re: Respawn Empty Cars - by Beaver07 - 13.10.2009, 16:25
Re: Respawn Empty Cars - by tunetu - 13.10.2009, 16:27
Re: Respawn Empty Cars - by (.Aztec); - 13.10.2009, 17:43

Forum Jump:


Users browsing this thread: