Sign in to follow this  
Followers 0
Nicinen

Помогите перевести команду на CMD

Рекомендованные сообщения



3 posts in this topic

Всем привет, переведите пожалуйста команду на CMD. 

if(strcmp(cmd, "/job1", true) == 0)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
		if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
		if(PlayerInfo[playerid][cPaintjob] != 3) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
		ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3);
		CarInfo[vehicleid][cPaintJob] = 1;
	    return 1;
	}
	if(strcmp(cmd, "/job2", true) == 0)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
		if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
		if(PlayerInfo[playerid][cPaintjob] != 2) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
		ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),2);
		CarInfo[vehicleid][cPaintJob] = 2;
	    return 1;
	}
	if(strcmp(cmd, "/job3", true) == 0)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
		if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
		if(PlayerInfo[playerid][cPaintjob] != 1) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
		ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),1);
		CarInfo[vehicleid][cPaintJob] = 3;
	    return 1;
	}

 

Edited by Nicinen

Share this post


Link to post
Share on other sites

@Nicinen,

Спойлер

CMD:job1(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
	if(PlayerInfo[playerid][cPaintjob] != 3) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
	ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),3);
	CarInfo[vehicleid][cPaintJob] = 1;
	return 1;
}
CMD:job2(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
	if(PlayerInfo[playerid][cPaintjob] != 2) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
	ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),2);
	CarInfo[vehicleid][cPaintJob] = 2;
	return 1;
}
CMD:job3(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(PlayerInfo[playerid][pAdministrator] >= 5) //Лвл администратора
	if(PlayerInfo[playerid][cPaintjob] != 1) ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),PlayerInfo[playerid][cPaintjob]);
	ChangeVehiclePaintjob(GetPlayerVehicleID(playerid),1);
	CarInfo[vehicleid][cPaintJob] = 3;
	return 1;
}

 

 

Если в командах нет параметров (после команды через пробел не нужно ничего вводить), тогда достаточно просто заменить шапку на такой формат:

CMD:команда(playerid)

 

Share this post


Link to post
Share on other sites

@odosenok Спасибо, теперь буду знать как перевести команду:) 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • AndreyBoy
      By AndreyBoy
      У меня появилась постоянная проблема при перезаходе на сервер именно при админке. Я пробовал перезаходить без админки и всё успешно. Но когда я перезахожу с админкой то у меня не перекидывает на авторизацию и тому подобное а просто стрелочки снизу и "Spawn". Пробовал тыкать и ничего не выходит. Помогите решить проблему