All pastes #673473 Raw Edit

Something

public text v1 · immutable
#673473 ·published 2007-08-28 13:11 UTC
rendered paste body

#include <a_samp>
#include <dini>
#include <dutils>

forward admin_cd();
forward SetupPlayerForClassSelection(playerid);

stock SetTeamScore(team, score);

#define COLOR_YELLOW 0xFFFF00AA
#define MIN_VEHI_ID		400
#define MAX_VEHI_ID		611
#define COLOR_PINK  	0xFF40FFFF

#define TEAM_WORKER 0
#define TEAM_GOLFER 1


static gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
new cd_timer,cd_seconds,Countdown;
new cd_freeze = 0;

new bool:IsServerLocked;





new gRoundTime = 1200000;					// Round time - 20 mins
//new gRoundTime = 900000;					// Round time - 15 mins
//new gRoundTime = 600000;					// Round time - 10 mins
//new gRoundTime = 300000;					// Round time - 5 mins
//new gRoundTime = 120000;					// Round time - 2 mins
//new gRoundTime = 60000;					// Round time - 1 min

/*enum PlayerSpawnInfo {
	Float:PlayerX,
	Float:PlayerY,
	Float:PlayerZ,
	Float:PlayerAngle
}*/
/*new Float:gRandomSpawns[][PlayerSpawnInfo] =
{
	{2544.5032,	2805.8840,	19.9922,	257.5800},
	{2556.2554,	2832.5313,	19.9922,	1.9000},
	{2561.9175,	2848.5532,	19.9922,	256.6609},
	{2613.9866,	2848.4475,	19.9922,	102.2487},
	{2611.5500,	2845.7542,	16.7020,	87.5428},
	{2545.9243,	2839.1824,	10.8203,	176.2378},
	{2647.6553,	2805.0278,	10.8203,	285.1536},
	{2672.9387,	2800.3374,	10.8203,	60.4288},
	{2672.8306,	2792.1057,	10.8203,	121.8451},
	{2647.7834,	2697.5884,	19.3222,	353.1684},
	{2654.5427,	2720.3474,	19.3222,	303.5359},
	{2653.2063,	2738.2432,	19.3222,	342.1389},
	{2641.1350,	2703.2019,	25.8222,	191.6982},
	{2599.1304,	2700.7249,	25.8222,	76.3487},
	{2606.1384,	2721.5237,	25.8222,	261.2564},
	{2597.3745,	2748.0884,	23.8222,	273.2050},
	{2595.0657,	2776.6729,	23.8222,	254.3630},
	{2601.3640,	2777.8101,	23.8222,	253.4439},
	{2584.3940,	2825.1748,	27.8203,	244.5475},
	{2631.8110,	2834.2593,	40.3281,	213.2975},
	{2632.2852,	2834.9390,	122.9219,	197.6725},
	{2646.1997,	2817.7070,	36.3222,	182.0474},
	{2685.8875,	2816.6575,	36.3222,	129.9525},
	{2691.1233,	2787.7883,	59.0212,	208.0777},
	{2717.8071,	2771.3464,	74.8281,	72.3429},
	{2695.2622,	2699.5488,	22.9472,	66.3686},
	{2688.8206,	2689.0039,	28.1563,	14.8979},
	{2655.0229,	2650.6807,	36.9154,	341.8097},
	{2570.4668,	2701.2876,	22.9507,	204.0154},
	{2498.9915,	2704.6204,	10.9844,	168.9241},
	{2524.1584,	2743.3735,	10.9917,	150.3771},
	{2498.3167,	2782.3357,	10.8203,	251.7015},
	{2504.5142,	2805.9763,	14.8222,	108.6137},
	{2522.2144,	2814.7087,	24.9536,	265.9478},
	{2510.6292,	2849.6384,	14.8222,	191.4991},
	{2618.2646,	2720.8005,	36.5386,	346.6828},
	{2690.9980,	2741.9060,	19.0722,	91.6099}
};
enum PickupSpawnInfo {
	Float:PickupX,
	Float:PickupY,
	Float:PickupZ
}
new Float:gMinigunPickups[][PickupSpawnInfo] =
{
	{2629.6345,	2732.8936,	36.5386},
	{2635.4575,	2767.9346,	25.8222},
	{2685.5012,	2746.6240,	20.3222},
	{2668.6201,	2767.9753,	17.6896},
	{2553.7502,	2754.9238,	10.8203},
	{2524.9805,	2817.3428,	10.8203},
	{2564.5159,	2823.4812,	12.7568},
	{2594.1836,	2821.1226,	12.7647},
	{2601.4983,	2769.2195,	25.8222}
};

new Float:gParachutePickups[][PickupSpawnInfo] =
{
	{2632.7573,	2829.8999,	64.3359},
	{2632.3562,	2829.9094,	94.0156},
	{2632.3701,	2829.7065,	122.9219},
	{2719.7905,	2775.7646,	74.8281}
};


new vehicleNames[212][] = {
   "Landstalker",
   "Bravura",
   "Buffalo",
   "Linerunner",
   "Pereniel",
   "Sentinel",
   "Dumper",
   "Firetruck",
   "Trashmaster",
   "Stretch",
   "Manana",
   "Infernus",
   "Voodoo",
   "Pony",
   "Mule",
   "Cheetah",
   "Ambulance",
   "Leviathan",
   "Moonbeam",
   "Esperanto",
   "Taxi",
   "Washington",
   "Bobcat",
   "Mr Whoopee",
   "BF Injection",
   "Hunter",
   "Premier",
   "Enforcer",
   "Securicar",
   "Banshee",
   "Predator",
   "Bus",
   "Rhino",
   "Barracks",
   "Hotknife",
   "Trailer", //artict1
   "Previon",
   "Coach",
   "Cabbie",
   "Stallion",
   "Rumpo",
   "RC Bandit",
   "Romero",
   "Packer",
   "Monster",
   "Admiral",
   "Squalo",
   "Seasparrow",
   "Pizzaboy",
   "Tram",
   "Trailer", //artict2
   "Turismo",
   "Speeder",
   "Reefer",
   "Tropic",
   "Flatbed",
   "Yankee",
   "Caddy",
   "Solair",
   "Berkley's RC Van",
   "Skimmer",
   "PCJ-600",
   "Faggio",
   "Freeway",
   "RC Baron",
   "RC Raider",
   "Glendale",
   "Oceanic",
   "Sanchez",
   "Sparrow",
   "Patriot",
   "Quad",
   "Coastguard",
   "Dinghy",
   "Hermes",
   "Sabre",
   "Rustler",
   "ZR3 50",
   "Walton",
   "Regina",
   "Comet",
   "BMX",
   "Burrito",
   "Camper",
   "Marquis",
   "Baggage",
   "Dozer",
   "Maverick",
   "News Chopper",
   "Rancher",
   "FBI Rancher",
   "Virgo",
   "Greenwood",
   "Jetmax",
   "Hotring",
   "Sandking",
   "Blista Compact",
   "Police Maverick",
   "Boxville",
   "Benson",
   "Mesa",
   "RC Goblin",
   "Hotring Racer", //hotrina
   "Hotring Racer", //hotrinb
   "Bloodring Banger",
   "Rancher",
   "Super GT",
   "Elegant",
   "Journey",
   "Bike",
   "Mountain Bike",
   "Beagle",
   "Cropdust",
   "Stunt",
   "Tanker", //petro
   "RoadTrain",
   "Nebula",
   "Majestic",
   "Buccaneer",
   "Shamal",
   "Hydra",
   "FCR-900",
   "NRG-500",
   "HPV1000",
   "Cement Truck",
   "Tow Truck",
   "Fortune",
   "Cadrona",
   "FBI Truck",
   "Willard",
   "Forklift",
   "Tractor",
   "Combine",
   "Feltzer",
   "Remington",
   "Slamvan",
   "Blade",
   "Freight",
   "Streak",
   "Vortex",
   "Vincent",
   "Bullet",
   "Clover",
   "Sadler",
   "Firetruck", //firela
   "Hustler",
   "Intruder",
   "Primo",
   "Cargobob",
   "Tampa",
   "Sunrise",
   "Merit",
   "Utility",
   "Nevada",
   "Yosemite",
   "Windsor",
   "Monster", //monstera
   "Monster", //monsterb
   "Uranus",
   "Jester",
   "Sultan",
   "Stratum",
   "Elegy",
   "Raindance",
   "RC Tiger",
   "Flash",
   "Tahoma",
   "Savanna",
   "Bandito",
   "Freight", //freiflat
   "Trailer", //streakc
   "Kart",
   "Mower",
   "Duneride",
   "Sweeper",
   "Broadway",
   "Tornado",
   "AT-400",
   "DFT-30",
   "Huntley",
   "Stafford",
   "BF-400",
   "Newsvan",
   "Tug",
   "Trailer", //petrotr
   "Emperor",
   "Wayfarer",
   "Euros",
   "Hotdog",
   "Club",
   "Trailer", //freibox
   "Trailer", //artict3
   "Andromada",
   "Dodo",
   "RC Cam",
   "Launch",
   "Police Car (LSPD)",
   "Police Car (SFPD)",
   "Police Car (LVPD)",
   "Police Ranger",
   "Picador",
   "S.W.A.T. Van",
   "Alpha",
   "Phoenix",
   "Glendale",
   "Sadler",
   "Luggage Trailer", //bagboxa
   "Luggage Trailer", //bagboxb
   "Stair Trailer", //tugstair
   "Boxville",
   "Farm Plow", //farmtr1
   "Utility Trailer" //utiltr1
};
*/
forward GameModeExitFunc();

//////////////////////////////
//  BEGIN THE ACTUAL CODE!  //
//////////////////////////////

main()
{
	print("\n----------------------------------");
	print(" TDM by TeD");
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	SetGameModeText("TDM by Ted v0.1");
	ShowNameTags(1);
	ShowPlayerMarkers(1);
	AllowAdminTeleport(1);
	AddPlayerClass(260,-2062.5583,237.4662,35.7149,268.8936,22,272,25,40,4,1); //Worker
	AddPlayerClass(259,-2642.2583,-274.9985,7.5393,135.0036,25,40,32,250,9,1);

	// Loop through the pickups

	SetTimer("GameModeExitFunc", gRoundTime, 0);

	
	return 1;
}

public OnPlayerRequestClass(playerid, classid)

{

	SetPlayerClass(playerid, classid);

	SetupPlayerForClassSelection(playerid);

	gPlayerClass[playerid] = classid;

	switch (classid) {

	    case 0:

	        {

				GameTextForPlayer(playerid, "~g~Worker", 500, 3);

			}

		case 1:

		    {

				GameTextForPlayer(playerid, "~g~Golfer", 500, 3);

			}

}

	return 1;

}


public OnPlayerConnect(playerid)
{
new string[256];
new players = 0;
++players;

new player[MAX_PLAYER_NAME];
GetPlayerName(playerid, player, sizeof(player));

if(IsServerLocked == true)
{
SendClientMessage(playerid,COLOR_YELLOW,"*** Ñåðâåð çàêðûò! Çàéäè ïîçæå!");
Kick(playerid);
}

SetPlayerColor(playerid,0x888888FF);
GameTextForPlayer(playerid,"~r~SA-MP:~w~TDM MODE by TeD ~r~version 0.2",2000,5);

format(string, sizeof(string), "*** Íà ñåðâåð çàø¸ë %s.", player);
SendClientMessageToAll(COLOR_YELLOW, string);
format(string, sizeof(string), "*** Íà ñåðâåðå %d èãðîêîâ.", players);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}

public SetupPlayerForClassSelection(playerid)

{

SetPlayerInterior(playerid,14);

SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);

SetPlayerFacingAngle(playerid, 90.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1003.0234);

SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);

}


public OnPlayerSpawn(playerid)

{

	SetPlayerInterior(playerid,0);

	if(gTeam[playerid] == TEAM_WORKER) {

	SetPlayerColor(playerid,COLOR_PINK); // Green

		}

	else if(gTeam[playerid] == TEAM_GOLFER) {

	SetPlayerColor(playerid,COLOR_YELLOW); // Yellow

}
		
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{

if(gTeam[killerid] != gTeam[playerid]) {

	    	// Valid kill

	SendDeathMessage(killerid,playerid,reason);

	SetPlayerScore(killerid,GetPlayerScore(killerid)+1);

	GivePlayerMoney(killerid, 1000);

}
	else {

			//Team Killer!

		new warning[256];

		format(warning, sizeof(warning), "*** Âû óáèëè ñâîåãî!.");

		SendClientMessage(killerid, 0xFFFF00AA, warning);

		SendDeathMessage(killerid,playerid,reason);

		GivePlayerMoney(killerid, -1000);

		SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);

}



return 1;

}



public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256];
	new idx;
	new string[256];

	cmd=strtok(cmdtext,idx);

	new player[MAX_PLAYER_NAME];
	GetPlayerName(playerid, player, sizeof(player));

	new temp[256];

	if(strcmp(cmd, "/teamscore", true) == 0) {
	new tmp[256];
	new team;
	new score;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }

	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/teamscore[id êîìàíäû][ôðàãè]");
}
	else{
	team = strval(tmp);

	tmp = strtok(cmdtext, idx);
	score = strval(tmp);

	SetTeamScore(team, score);

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë êîìàíäå id: %d êîë-âî ôðàãîâ íà %d$.", team, score);
	SendClientMessageToAll(COLOR_YELLOW, string);

}
	return 1;
}


	if(strcmp(cmd, "/adhelp", true) == 0) {
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }

SendClientMessage(playerid,COLOR_YELLOW, "*** Àäìèíñêèå êîììàíäû:");
SendClientMessage(playerid,COLOR_YELLOW, "*** /teamscore /cd /givecash /armor /armorall /health /healthall /car /carall");
SendClientMessage(playerid,COLOR_YELLOW, "*** /explode /lockserv /unlockserv /carheal /carhealall /skin /skinall /settime");
SendClientMessage(playerid,COLOR_YELLOW, "*** /weather /telhere /goto /setwan /remove /freeze /unfreeze /delcar");



	return 1;
}

	if (strcmp(cmd, "/cd", true) == 0)
{
    if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
    cd_seconds = strval(strtok(cmdtext,idx));
    temp = strtok(cmdtext,idx);
    if(cd_seconds <= 0 || cd_seconds > 60 || !strlen(temp))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** /cd [ñåêóíäû:1-60] [çàìîðîçêà:1-0]");
        return 1;
    }
    cd_freeze = strval(temp);
    if(cd_freeze > 1)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** /cd [ñåêóíäû:1-60] [çàìîðîçêà:1-0]");
        return 1;
    }
    if(cd_freeze == 1)
    {
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                TogglePlayerControllable(i,0);
            }
        }
    }
    Countdown = 5;
    format(string, sizeof(string),"%d ñåêóíä, çàìîðîçêà=%d",cd_seconds,cd_freeze);
    SendClientMessage(playerid,COLOR_YELLOW,string);
    cd_timer = SetTimer("admin_cd",1000,1);
    return 1;
}

	if(strcmp(cmdtext, "/stopcd", true) == 0)
{
    if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
    if (Countdown == 1)
    {
        Countdown = 0;
        KillTimer(cd_timer);
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                TogglePlayerControllable(i,1);
            }
        }
        new pname[24];GetPlayerName(playerid,pname,sizeof(pname));
        format(string,sizeof(string),"~r~countdown stopped by ~w~%s",pname);
        GameTextForAll(string,3000,4);
        SendClientMessage(playerid,COLOR_YELLOW,"*** Ñ÷¸ò÷èê îñòàíîâëåí.");
        return 1;
    }
    else
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Ñ÷¸ò÷èê íå îñòàíîâëåí");
        return 1;
    }
}


	if(strcmp(cmd, "/givecash", true) == 0) {
	new tmp[256];
	new amount;
	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/givecash[id èãðîêà][ñóììà]");
}
	else{
	id = strval(tmp);

	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	}
	
	tmp = strtok(cmdtext, idx);
	amount = strval(tmp);

	GivePlayerMoney(id,amount);
	
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð äàë âàì %d$.", id, amount);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû äàëè èãðîêó %s %d$.", player, amount);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}
	/*if(strcmp(cmd, "/setcolor", true) == 0) {
	new tmp[256];
	new colors;
	new id;


	tmp = strtok(cmdtext, idx);
	id = strval(tmp);
	
	tmp = strtok(cmdtext, idx);
	colors = strval(tmp);


	SetPlayerColor(id,colors);
	return 1;
}
*/

	if(strcmp(cmd, "/car", true) == 0) {
	new tmp[256];
	new carid;
	new id;

  	new Float:X,Float:Y, Float:Z;

 	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
    
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/car[id èãðîêà][id ìàøèíû]");
}
	else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	}
	tmp = strtok(cmdtext, idx);
	carid = strval(tmp);

	GetPlayerPos(id,X,Y,Z);
 	if (carid < MIN_VEHI_ID || carid > MAX_VEHI_ID) {
	    	SendClientMessage(playerid, COLOR_YELLOW, "*** Íåïðàâåëüíûé id ìàøèíû");
	    	return true;
	    	}
	    	


	CreateVehicle(carid,X,Y,Z,0,1,1,5000);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð çàñïàâíèë âàì ìàøèíó id:%d.", carid);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû çàñïàâíèëè èãðîêó %s ìàøèíó id:%d.", player, carid);
	SendClientMessage(playerid,COLOR_YELLOW, string);


}

	return 1;
}


	if(strcmp(cmd, "/ban", true) == 0) {
	new tmp[256];
	new id;


 	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }

	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/car[id èãðîêà][id ìàøèíû]");
}
	else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	}




	
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð çàáàíèë âàñ");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû çàáàíèëè èãðîêà %s.", player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
	Ban(id);


}

	return 1;
}



	if(strcmp(cmd, "/carhealall", true) == 0) {
	new tmp[256];
	new health;

	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }

	tmp = strtok(cmdtext, idx);

	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/carhealall[õï ìàøèíû]");
}
	else
{
	health= strval(tmp);

	CarHealth(health);

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âñåì õï ìàøèíû íà %d.", health);
	SendClientMessageToAll(COLOR_YELLOW, string);

}


	return 1;
}

if(strcmp(cmd, "/carheal", true) == 0) {
	new tmp[256];
	new id;
	new health;
	
		if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
    
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/carheal[id èãðîêà][õåëû]");
}
	id= strval(tmp);
 if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	}
	tmp = strtok(cmdtext, idx);
	health= strval(tmp);
if (IsPlayerConnected(id))
	    {

SetVehicleHealth(GetPlayerVehicleID(id),health);

format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âàì õï ìàøèíû íà %d.", health);
SendClientMessage(id,COLOR_YELLOW, string);
format(string, sizeof(string), "*** Âû èçìåíèëè õï ìàøèíû  íà %d.", health);
SendClientMessage(id,COLOR_YELLOW, string);
}
else
{
format(string, sizeof(string), "*** Èãðîê ñ id: %d íå â ìàøèíå.", id);
SendClientMessageToAll(COLOR_YELLOW, string);
}

	return 1;
}


	if(strcmp(cmd, "/carall", true) == 0) {
	new tmp[256];
	new carid;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/carall[id ìàøèíû]");
}
	else{
	carid = strval(tmp);
	
	if (carid < MIN_VEHI_ID || carid > MAX_VEHI_ID) {
	SendClientMessage(playerid, COLOR_YELLOW, "*** Íåïðàâåëüíûé id ìàøèíû");
	return true;
}

	CreateVehicleForAll(carid);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð çàñïàâíèë ìàøèíû id: %d.", carid);
	SendClientMessageToAll(COLOR_YELLOW, string);
}

	return 1;
}


	if(strcmp(cmd, "/health", true) == 0) {
	new tmp[256];
	new id;
	new health;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/health[id èãðîêà][õï èãðîêà]");
}
	else{
	id	= strval(tmp);
	
	if (!IsPlayerConnected(id)) {
    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
 	return true;
	}
	
	tmp = strtok(cmdtext, idx);
	health = strval(tmp);

	SetPlayerHealth(id,health);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âàì çäîðîâüå íà %d.", health);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû èçìíåèëè èãðîêó %s íà %d.", player, health);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/freeze", true) == 0) {
	new tmp[256];
	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/freeze[id èãðîêà]");
}
	else{
	id	= strval(tmp);

	if (!IsPlayerConnected(id)) {
    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
 	return true;
	}

	TogglePlayerControllable(id,0);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âàñ çàìîðîçèë.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû çàìîðîçèëè èãðîêà %s.", player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}


	if(strcmp(cmd, "/freezeall", true) == 0) {
	new tmp[256];

	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/freezeall");

	FreezeAll();
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âñåõ çàìîðîçèë.");
	SendClientMessageToAll(COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû âñåõ çàìîðîçèëè");
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/unfreezeall", true) == 0) {
	new tmp[256];

	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/unfreezeall");

	UnFreezeAll();
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âñåõ ðàìîðîçèë.");
	SendClientMessageToAll(COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû âñåõ ðàçìîðîçèëè");
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}


	if(strcmp(cmd, "/unfreeze", true) == 0) {
	new tmp[256];
	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/freeze[id èãðîêà]");
}
	else{
	id	= strval(tmp);

	if (!IsPlayerConnected(id)) {
    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
 	return true;
	}

	TogglePlayerControllable(id,1);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âàñ ðàçìîðîçèë.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû ðàçìîðîçèëè èãðîêà %s.", player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}


	if(strcmp(cmd, "/armor", true) == 0) {
	new tmp[256];
	new id;
	new armor;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/armor[id èãðîêà/all][êîë-âî áðîíè]");
}
	else
{
	id	= strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	}
	tmp = strtok(cmdtext, idx);
	armor = strval(tmp);

	SetPlayerArmour(id,armor);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âàì áðîíþ íà %d.", armor);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû èçìíåèëè èãðîêó %s íà %d.", player, armor);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}





	if(strcmp(cmd, "/explode", true) == 0) {
	new tmp[256];
	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/explode[id èãðîêà]");
}
	else
{
	id	= strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	}
	tmp = strtok(cmdtext, idx);

	ExplodePlayer(id);

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âçîðâàë âàñ.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû âçîðâàëè %s.", player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/lockserv", true) == 0) {
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }


	IsServerLocked = true;

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð çûêðûë ñåðâåð.");
	SendClientMessageToAll(COLOR_YELLOW, string);

	return 1;
}

	if(strcmp(cmd, "/unlockserv", true) == 0) {
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }


	IsServerLocked = false;

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð çûêðûë ñåðâåð.");
	SendClientMessageToAll(COLOR_YELLOW, string);

	return 1;
}



	if(strcmp(cmd, "/armorall", true) == 0) {
	new tmp[256];
	new armor;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/armorall[êîë-âî áðîíè]");
}
	else{
	armor = strval(tmp);
	
	
	ArmourAll(armor);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âñåì áðîíþ íà %d.", armor);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/healall", true) == 0) {
	new tmp[256];
	new health;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/healall[êîë-âî õï]");
	}else{
	health = strval(tmp);


	HealthAll(health);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âñåì õï íà %d.",health);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/skinall", true) == 0) {
	new tmp[256];
	new skin;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/skinall[id ñêèíà]");
	}else{
	skin = strval(tmp);
	SkinAll(skin);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âñåì ñêèí íà %d.",skin);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}



	if(strcmp(cmd, "/skin", true) == 0) {
	new tmp[256];
	new skin;
	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/skin[id èãðîêà][id ñêèíà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	}
	tmp = strtok(cmdtext, idx);
	skin = strval(tmp);
	SetPlayerSkin(id,skin);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âàì ñêèí íà %d.",skin);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû èçìåíèë ñêèí èãðîêó %s íà %d.",player,skin);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/weap", true) == 0) {
	new tmp[256];
	new id;
	new weid;
	new ammo;
	
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/weap[id èãðîêà][id îðóæèÿ][àììî]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	}
	tmp = strtok(cmdtext, idx);
	weid = strval(tmp);
	tmp = strtok(cmdtext, idx);
	ammo = strval(tmp);
	GivePlayerWeapon(id,weid,ammo);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð äàë âàì îðóæèå id:%d è %d ïàòðîí.",weid,ammo);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû äàëè îðóæèå id:%d è %d ïàòðîí èãðîêó %s.",weid,ammo, player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
	return 1;
}



	if(strcmp(cmd, "/goto", true) == 0) {
	new tmp[256];
 	new id,Angle;
	new Float:X,Float:Y,Float:Z;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/goto[id èãðîêà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	    }
	   if(IsPlayerInAnyVehicle(playerid)) {
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GetPlayerPos(id,X,Y,Z);
GetPlayerFacingAngle(id,Angle);
SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, Z);
SetPlayerFacingAngle(playerid,Angle);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð òåëåïîðòèðîâàëñÿ ê âàì.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû òåëåïîðòèðîâàëèñü ê èãðîêó %s.",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
else{
	GetPlayerPos(id,X,Y,Z);
GetPlayerFacingAngle(id,Angle);
SetPlayerFacingAngle(playerid,Angle);
SetPlayerPos(playerid, X + 0.01, Y + 0.01, Z);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð òåëåïîðòèðîâàëñÿ ê âàì.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû òåëåïîðòèðîâàëèñü ê èãðîêó %s.",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
}

	return 1;
}


	if(strcmp(cmd, "/weather", true) == 0) {
	new tmp[256];
	new weather;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/weather[id ïîãîäû]");
	}else{
	weather = strval(tmp);

	Weather(weather);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð ïîìåíÿë ïîãîäó íà %d .",weather);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}



	if(strcmp(cmd, "/gravity", true) == 0) {
	new tmp[256];
	new Float:g;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/gravity[ãðàâèòàöèÿ]");
	}else{
	g = floatstr(tmp);

	SetGravity(g);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð ïîìåíÿë ãðàâèòàöèþ íà %f .",g);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}



	if(strcmp(cmd, "/settime", true) == 0) {
	new tmp[256];
	new time;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/settime[êîë-âî ÷àñîâ]");
	}else{
	time = strval(tmp);

	SetTime(time);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð ïîìåíÿë âðåìÿ íà %d .",time);
	SendClientMessageToAll(COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/telhere", true) == 0) {
	new tmp[256];
 	new id;
 
	new Float:X,Float:Y,Float:Z;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/telhere[id èãðîêà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	    }
	    
if(IsPlayerInAnyVehicle(id)) {
new VehicleID;
VehicleID = GetPlayerVehicleID(id);
GetPlayerPos(playerid,X,Y,Z);
SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, Z);

	format(string, sizeof(string), "*** Àäìèíèñòðàòîð òåëåïîðòèðîâàë ê ñåáå.",id);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû òåëåïîðòèðîâàëè èãðîêà %s ê ñåáå .",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}else{
GetPlayerPos(playerid,X,Y,Z);
SetPlayerPos(id, X + 0.01, Y + 0.01, Z);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð òåëåïîðòèðîâàë ê ñåáå.",id);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû òåëåïîðòèðîâàëè èãðîêà %s ê ñåáå .",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);

}
}

	return 1;
}



	if(strcmp(cmd, "/fall", true) == 0) {
	new tmp[256];
 	new id,fall,Angle;
	new Float:X,Float:Y,Float:Z;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/fall[id èãðîêà][âûñîòà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	    }

   	tmp = strtok(cmdtext, idx);
	fall = strval(tmp);
	if(IsPlayerInAnyVehicle(id)) {
new VehicleID;
VehicleID = GetPlayerVehicleID(id);
GetPlayerPos(id,X,Y,Z);
GetPlayerFacingAngle(id,Angle);
SetVehiclePos(VehicleID, X + 0.01, Y + 0.01, Z+fall);
SetPlayerFacingAngle(id,Angle);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð ïîäáðîñèë âàñ íà âûñîòó %d .",fall);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû ïîäáðîñèëè èãðîêà %s íà âûñîòó %d .",player,fall);
	SendClientMessage(playerid,COLOR_YELLOW, string);
}
else{
	GetPlayerPos(playerid,X,Y,Z);
	SetPlayerPos(id,X,Y,Z+fall);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð ïîäáðîñèë âàñ íà âûñîòó %d .",fall);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû ïîäáðîñèëè èãðîêà %s íà âûñîòó %d .",player,fall);
	SendClientMessage(playerid,COLOR_YELLOW, string);

}
}
	return 1;
}




	if(strcmp(cmd, "/delcar", true) == 0) {
	new tmp[256];
 	new id;
	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/delcar[id èãðîêà][id èãðîêà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
 	SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
  	return true;
	    }


DestroyVehicle(GetPlayerVehicleID(id));
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð óäàëèë âàì ìàøèíó.");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû óäàëèëè èãðîêó %s ìàøèíó.",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);

}
	return 1;
}

	if(strcmp(cmd, "/setwan", true) == 0) {
	new tmp[256];
 	new id,wanted;

	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/setwan[id èãðîêà][óðîâåíü]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	    }

	tmp = strtok(cmdtext, idx);
	wanted = strval(tmp);
	SetPlayerWantedLevel(id,wanted);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð èçìåíèë âàø óðîâåíü ðàçûñâèâàåìîñòè %d .",wanted);
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû èçìåíèëè èãðîêó %s óðîâåíü ðàçûâñêèâàåìîñòè íà %d .",player,wanted);
	SendClientMessage(id,COLOR_YELLOW, string);
}
	return 1;
}

	if(strcmp(cmd, "/remove", true) == 0) {
	new tmp[256];
 	new id;

	if (!IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"*** Âû äîëæíû áûòü àäìèíîì!!");
        return 1;
    }
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp)){
	SendClientMessage(playerid,COLOR_YELLOW,"/remove[id èãðîêà]");
	}else{
	id = strval(tmp);
	if (!IsPlayerConnected(id)) {
	    SendClientMessage(playerid, COLOR_YELLOW, "*** Èãðîêà ñ òàêèì id íåòó!");
	    return true;
	    }

	RemovePlayerFromVehicle(id);
	format(string, sizeof(string), "*** Àäìèíèñòðàòîð âûáðîñèë âàñ èç ìàøèíû ");
	SendClientMessage(id,COLOR_YELLOW, string);
	format(string, sizeof(string), "*** Âû âûáðîñèëè èãðîêà %s èç ìàøèíû.",player);
	SendClientMessage(playerid,COLOR_YELLOW, string);

}
	return 1;
}

	return 0;
}



stock CreateVehicleForAll(VehicleId)
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {
     	new Float:x, Float:y, Float:z, Float:a;
		GetPlayerPos(i, x, y, z);
		GetPlayerFacingAngle(i, a);
    	CreateVehicle(VehicleId, x + 3.0, y + 3.0, z + 2.0, a + 90.0, -1, -1, 5000);
	    }
	}
	return 1;
}

stock CarHealth(Float:health)
{

for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {
	for (new carid=0; carid<600; carid++)
	{
	    if (IsPlayerInVehicle(i,carid))
	    {
SetVehicleHealth(carid,health);
	    }
	   
	}
	}
	}
return 1;
}


stock SetTime(time)
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {
SetPlayerTime(i,time,0);
	    }
	}
	return 1;
}

stock ArmourAll(Float:armour)
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {

	SetPlayerArmour(i,Float:armour);
  	    }
	}
	return 1;
}

stock SkinAll(skin)
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {

	SetPlayerSkin(i,skin);
  	    }
	}
	return 1;
}


stock Weather(weather)
{


	SetWeather(weather);


	return 1;
}


stock HealthAll(Float:health)
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {

	SetPlayerHealth(i,Float:health);
  	    }
	}
	return 1;
}




stock FreezeAll()
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {

	TogglePlayerControllable(i,0);
  	    }
	}
	return 1;
}

stock UnFreezeAll()
{
	for (new i=0; i<254; i++)
	{
	    if (IsPlayerConnected(i))
	    {

	TogglePlayerControllable(i,1);
  	    }
	}
	return 1;
}



public admin_cd()
{
    if(cd_seconds <= 0)
    {
        GameTextForAll("~r~GO!",3000,4);
        Countdown = 0;
        KillTimer(cd_timer);
        if(cd_freeze == 1)
        {
            for(new i=0; i<MAX_PLAYERS; i++)
            {
                if (IsPlayerConnected(i))
                {
                    TogglePlayerControllable(i,1);
                }
            }
        }
    }
    else
    {
        new output[10];
        format(output, sizeof(output), "~w~%d", cd_seconds);
        GameTextForAll(output,3000,4);
    }
    cd_seconds = cd_seconds - 1;
    return;
}


stock SetTeamScore(team, score) // by Hellomy
{
 for (new i = 0; i < MAX_PLAYERS; i++)
 {
  if (gTeam[i] == team && IsPlayerConnected(i)) SetPlayerScore(i, score);
 }
}


stock FreezeTeam(team,bool:toggle) //by Pixels^ and Xtreme
{
  for(new i=0; i<MAX_PLAYERS; i++) {
    if(IsPlayerConnected(i)) {
      if(gTeam[i] == team) {
        if(toggle == true) {
          TogglePlayerControllable(i,0);
        }
        else {
          TogglePlayerControllable(i,1);
        }
      }
    }
  }
}

stock ToggleTeamVisibility(team,bool:visible) //by Pixels^ and Xtreme
{
  
  for(new i=0; i<MAX_PLAYERS; i++) {
    if(IsPlayerConnected(i)) {
      if(gTeam[i] == team) {
        if(visible == true) {
          SetPlayerColor(i,0xFF000000);
        }
        else {
		new color = GetPlayerColor(i);
          SetPlayerColor(i,color);
        }
      }}
    }
}


SetPlayerClass(playerid, classid) {

	if(classid == 0) {

	gTeam[playerid] = TEAM_WORKER;

	} else if(classid == 1) {

	gTeam[playerid] = TEAM_GOLFER;

	} 

}


stock ExplodePlayer(playerid)
{
    if (IsPlayerConnected(playerid))
	{
	new Float:XPOS;
	new Float:YPOS;
	new Float:ZPOS;
	GetPlayerPos(playerid, XPOS, YPOS, ZPOS);
	CreateExplosion(XPOS, YPOS, ZPOS, 3, 5);
    }
	return 1;
}



public GameModeExitFunc() { GameModeExit(); }