Help, please.
#7

Quote:
Originally Posted by GiamPy.
Посмотреть сообщение
Also, I have noticed that

pawn Код:
if(GetPlayerVehicleID(x) == i)
does not make any sense as 'x' isn't defined anywhere (I had to define it to fix your issues, however it has a different purpose).

What are you trying to accomplish doing that?
Due to hackers sometimes (warp hacking) and sometimes people leave cars in the middle of a road and to go around 30 different vehicles destroying them, or parking them up there is a command for respawning a certain radius of vehicles - (i.e. 10 - 40) and when typing out the command, it will respawn all the vehicles in that radius. (They will be re-spawned in their originial parking places).

Here is the command;

Код:
CMD:respawncars(playerid, params[]) {
	if(PlayerInfo[playerid][pAdmin] >= 2) {
	    if(isnull(params))
	        return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /respawncars [radius]");

 		if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
	        return SendClientMessage(playerid, COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you

must be on-duty. Type /aduty to go on-duty.");

		new string[128], radius = strval(params);

		if((radius < 1 || radius > 40) && PlayerInfo[playerid][pAdmin] < 4)
			return SendClientMessage(playerid, COLOR_WHITE, "Radius must be higher than 0 and lower than 31!");

		RespawnNearbyVehicles(playerid, radius);
		format(string, sizeof(string), "You have respawned all vehicles within a radius of %d.", radius);
		SendClientMessage(playerid, COLOR_GREY, string);
	} else SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");

	return true;
}
Reply


Messages In This Thread
Help, please. - by CharlieGamble - 02.01.2014, 17:35
Re: Help, please. - by GiamPy. - 02.01.2014, 17:42
Re: Help, please. - by CharlieGamble - 02.01.2014, 17:55
Re: Help, please. - by K9IsGodly - 02.01.2014, 17:59
Re: Help, please. - by CharlieGamble - 02.01.2014, 18:01
Re: Help, please. - by GiamPy. - 02.01.2014, 18:04
Re: Help, please. - by CharlieGamble - 02.01.2014, 18:09
Re: Help, please. - by CharlieGamble - 02.01.2014, 18:22

Forum Jump:


Users browsing this thread: 1 Guest(s)