cZm | Дата: Понедельник, 18.04.2011, 17:36 | Сообщение # 1 |
Рядовой
Группа: Пользователи
Сообщений: 18
Статус:
| И так ставим после #include: Code #define COLOR_RED 0xAA3333AA //определяем цвета #define CHECKPOINT_NONE 0 //убирает все чекпоинты #define CHECKPOINT_A 1 #define CHECKPOINT_B 2 #define CHECKPOINT_C 3 #define CHECKPOINT_D 4 #define CHECKPOINT_E 5 #define CHECKPOINT_F 6 #define CHECKPOINT_G 7 #define CHECKPOINT_H 8 #define CHECKPOINT_J 9 // Все эти команды определяют чекпоинты... #define COLOR_GREEN 0x33AA33AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_YELLOW 0xFFFF00AA new gPlayerClass[MAX_PLAYERS]; new gPlayerCheckpointStatus[MAX_PLAYERS]; Далее добавить в Quote public OnPlayerSpawn(playerid): Code public OnPlayerSpawn(playerid) // Заменить ваш OnPlayerSpawn этим { SetPlayerInterior(playerid,0); switch (gPlayerClass[playerid]) { case 0: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_A; SetPlayerCheckpoint(playerid,-1060.2656,-1205.3883,129.2188,2.0); } case 1, 2, 3, 4, 5, 6, 7, 8, 9: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; } } return 1; } Добавляем команду: Code public OnPlayerEnterCheckpoint(playerid) { switch (gPlayerCheckpointStatus[playerid]) { case CHECKPOINT_A: { SetPlayerCheckpoint(playerid,-345.7894,-1046.6093,59.8125,2.0); IsPlayerInAnyVehicle(playerid); SendClientMessage(playerid,COLOR_WHITE,">Это твоё первое задание..."); SendClientMessage(playerid,COLOR_WHITE,">Едь на другой чекпоинт и возьми кейс!"); IsPlayerInAnyVehicle(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_B; } case CHECKPOINT_B: { SetPlayerCheckpoint(playerid,-262.8102,-2183.5281,28.9523,2.0); IsPlayerInAnyVehicle(playerid); SendClientMessage(playerid,COLOR_WHITE,">Отвези кейс на ферму!"); gPlayerCheckpointStatus[playerid] = CHECKPOINT_C; } case CHECKPOINT_C: { SetPlayerCheckpoint(playerid,-1111.7607,-1621.2410,76.3739,2.0); GivePlayerMoney(playerid,3000); PlayerPlaySound(playerid,1062,-262.8102,-2183.5281,28.9523); SendClientMessage(playerid,COLOR_GREEN,">Молодец! Ты прошёл миссию получи 3000 баксов!"); SendClientMessage(playerid,COLOR_GREEN,">Следующая миссия на чекпоинте!"); gPlayerCheckpointStatus[playerid] = CHECKPOINT_D; } case CHECKPOINT_D: { SetPlayerCheckpoint(playerid,-1827.6156,-1927.0413,90.7038,2.0); SendClientMessage(playerid,COLOR_YELLOW,">Найди самолёт и лети в Сан Фиерро!"); gPlayerCheckpointStatus[playerid] = CHECKPOINT_E; } case CHECKPOINT_E: { SetPlayerInterior(playerid,1); SetPlayerPos(playerid,1.6297,23.8689,1199.5938); SendClientMessage(playerid,COLOR_YELLOW,">Ты летишь в Сан фиерро!"); SetPlayerCheckpoint(playerid,2.8139,33.0639,1199.5938,2.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_F; } case CHECKPOINT_F: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-1384.7823,-345.2231,14.1484); SendClientMessage(playerid,COLOR_YELLOW,">Едь в парк и возьми пакет!"); SetPlayerCheckpoint(playerid,-2706.3647,376.2090,4.9686,2.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_G; } case CHECKPOINT_G: { SetPlayerCheckpoint(playerid,-1384.7823,-345.2231,14.1484,2.0); SendClientMessage(playerid,COLOR_YELLOW,">Едь в аэропорт!"); gPlayerCheckpointStatus[playerid] = CHECKPOINT_H; } case CHECKPOINT_H: { SetPlayerInterior(playerid,1); SetPlayerPos(playerid,1.6297,23.8689,1199.5938); SendClientMessage(playerid,COLOR_WHITE,">Ты летишь обратно!"); SetPlayerCheckpoint(playerid,2.8139,33.0639,1199.5938,2.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_J; } case CHECKPOINT_J: { SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-2318.4241,-1636.1868,1317.5997); ResetPlayerWeapons(playerid); SendClientMessage(playerid,COLOR_RED,">Тебя подставили и выкинули из самолёта!!!"); SendClientMessage(playerid,COLOR_GREEN,">Время умирать чувак! :)"); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); } } return 1; }
Главный администратор сайта game-sa.tk Самое главное захотеть.
|
|
| |