Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Команда с опр. кол-ва очков.

Статус
В этой теме нельзя размещать новые ответы.
Как сделать чтобы команда была с опр. кол-ва очков.С уведомлением,тоесть если очков не хватало, то уведомляли мол "Недостаточно очков"
PHP:
// Repairs the player's vehicle
COMMAND:repair(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/repair", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player's admin-level is at least 0
		if (APlayerData[playerid][PlayerLevel] >= 0)
		{
		    // Check if the player is inside a vehicle
			if(!IsPlayerInAnyVehicle(playerid))
				return SendClientMessage(playerid, 0xFF0000FF, "Вы не в автомобиле"); // Let the player know he's not inside a vehicle and let the server know that this was a valid command
			// Fully repair the vehicle (damage value and bodywork)
			RepairVehicle(GetPlayerVehicleID(playerid));
			// Send the player a message to inform him that his vehicle has been repaired
			SendClientMessage(playerid, 0x00FF00FF, "Вы поченили свой автомобиль!");
		}
		else
		    return 0;
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу