command makes cars and everything bugged
#1

When i use that command, for respawning all cars, the server comes stuck for a 2-3 minutes, then after everything goes wrong, the cars arent starting, 3d text doesnt disappear, and so on.
Is there any other alternatives for this command which work on 0.3x?
Код:
if(strcmp(cmd, "/rescar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pAdmin] < 3)
			{
			    SendClientMessage(playerid, COLOR_GRAD1, "U have no permission!");
			    return 1;
			}
			new bool:unwanted[CAR_AMOUNT];
			for(new player=0; player<MAX_PLAYERS; player++)
     		{
            	if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
     		}
			for(new car = 1; car <= 2000; car++)
			{
				if(!unwanted[car])
				{
					SetVehicleToRespawn(car);
				}
			}
			GetPlayerName(playerid,sendername,MAX_PLAYER_NAME);
			format(string,sizeof(string), " * Cars have been respawned by admin %s",sendername);
			SendClientMessageToAll(COLOR_LIGHTRED, string);
		}
		return 1;
	}
Reply


Messages In This Thread
command makes cars and everything bugged - by Aftemark - 11.02.2013, 10:56
AW: command makes cars and everything bugged - by roym899 - 11.02.2013, 11:40
Re: command makes cars and everything bugged - by Aftemark - 11.02.2013, 11:43
AW: command makes cars and everything bugged - by roym899 - 11.02.2013, 11:48
Re: command makes cars and everything bugged - by Aftemark - 12.02.2013, 12:06
Re: command makes cars and everything bugged - by Aftemark - 12.02.2013, 12:15

Forum Jump:


Users browsing this thread: 1 Guest(s)