Sign in to follow this  
Followers 0
SlenderTop4ik

[MxINI] /fuelcars - заправить все автомобили

4 posts in this topic

Здравствуйте, я выкладываю команду /fuelcars. Что она делает? Она заправляет все автомобили на сервере! Код ниже:

Автор: неизвестен

Слил команду: Я (SlenderTop4ik)

	if(strcmp(cmd, "/fuelcars", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 7)//Проверка на админа. Меняйте на свое.
			{
				for(new c=0;c<CAR_AMOUNT;c++)
				{
					for(new i = 0; i < MAX_PLAYERS; i++)
					{
						CarInfo[c][cLamps] = GasMax;
						Gas[c] = GasMax;
					}
				}
				SendClientMessage(playerid, COLOR_YELLOW, "Все авто заправлены!");
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "Вы не Администратор");
				return 1;
			}
		}
		return 1;
	}

 

Share this post


Link to post
Share on other sites

dc_cmd?

 

Share this post


Link to post
Share on other sites

@SenyaLi_e нет, обычный командный процессор, насколько мне не изменяет память 

Share this post


Link to post
Share on other sites
CMD:fuelcars(playerid)
{
    if(PlayerInfo[playerid][pAdmin] < 7return SendClientMessage(playerid, COLOR_GREY, "Вы не Администратор");
    for(new index = 0; index < MAX_VEHICLES; index++) Gas[index] = 100// Массив Gas с топливом заменяем на свой.
    SendClientMessage(playerid, -1"Все авто заправлены!");
    return true;
}

 

Edited by #pragma

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • fefeef12
      By fefeef12
      Пишет что, id 202 но я 0 id. Можете исправить:
       
      new string[100]; SCM(playerid, COLOR_WHITE, "{ffaa00}Вы отправили сообщение администраторам!"); format(string, sizeof(string), "{ffaa00}Жалоба от игрока {ffffff}%s {ffaa00}[%d]: {ffffff}%s", player_info[playerid][NAME], (inputtext)); SendAdminMessage(COLOR_WHITE, string);   Даже моё сообщение не написано
    • fefeef12
      By fefeef12
      format(str,sizeof(str),"%s\n{FFFFFF}%i. %s[%d] | Жалоба: %s [%s]", string, null, player_info[playerid][NAME], playerid, ,i, report_info[playerid][REPORTTEXT], date("%hh:%ii:%ss", report_info[playerid][REPORTTIME]));   c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : error 029: invalid expression, assumed zero
      c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : warning 215: expression has no effect
      c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : error 017: undefined symbol "report_info"
      c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : warning 215: expression has no effect
      c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : error 001: expected token: ";", but found "]"
      c:\Users\User\Desktop\Avil Role Play\gamemodes\new.pwn(628) : fatal error 107: too many error messages on one line