GTA-SAMP
Каталог файлов

Меню сайта

Категории раздела

Мини-чат

Статистика


Онлайн всего: 1
Гостей: 1
Пользователей: 0

[GM]The World Under War Enter USA and JAP
03.12.2008, 17:29

#include static gTeam[MAX_PLAYERS]; new gPlayerClass[MAX_PLAYERS]; new COL_CMD; new gRoundTime = 300000; new stringcmd[256]; new pname[MAX_PLAYER_NAME]; #define USA 0 #define JAP 1 main() { print("\n-----------------------------------------------"); print(" The World Under War - By **HITMEN**"); print("-----------------------------------------------\n"); } public OnGameModeInit() { SetGameModeText("World Under War |DM|WR|"); SetTeamCount(2); ShowNameTags(1); ShowPlayerMarkers(1); SetWorldTime(8); //-----------------------------Americans------------------- AddPlayerClass(287,275.1580,2033.5170,17.6406,245.3225,24,120,31,250,4,1); // US1 AddPlayerClass(282,273.7383,2029.3341,17.6406,258.4200,24,120,31,250,4,1); // US2 AddPlayerClass(285,274.1580,2024.1335,17.6406,268.0708,24,120,31,250,4,1); // US3 AddPlayerClass(179,274.8023,2019.5355,17.6406,298.4017,24,120,31,250,4,1); // US4 //-----------------------------Japanese--------------------------- AddPlayerClass(122,-1676.8309,-274.0188,13.9162,314.8310,24,120,30,250,8,1); // JAP1 AddPlayerClass(123,-1679.6526,-270.1272,13.9150,314.5475,24,120,30,250,8,1); // JAP2 AddPlayerClass(49,-1682.8104,-267.3004,13.9182,314.2761,24,120,30,250,8,1); // JAP3 AddPlayerClass(59,-1685.2582,-265.6046,13.9164,313.2065,24,120,30,250,8,1); // JAP4 //-----------------------------Vehicules-Obstacles------------------ AddStaticVehicle(476,-1661.4054,-255.1066,14.8692,0.2390,1,3); //CombatPlane AddStaticVehicle(476,-1673.4581,-253.2208,14.8521,347.0321,1,3); //CombatPlane AddStaticVehicle(476,-1683.2968,-247.6022,14.8520,321.1118,1,3); //CombatPlane AddStaticVehicle(476,-1690.7891,-238.1351,14.8718,297.1119,1,3); //CombatPlane AddStaticVehicle(476,-1669.5787,-167.5251,14.8511,315.4193,1,3); //CombatPlane AddStaticVehicle(476,-1659.5006,-176.3881,14.8752,313.5137,1,3); //CombatPlane AddStaticVehicle(433,-1661.7058,-293.0654,14.1621,78.1015,1,3); //ArmyTruck AddStaticVehicle(447,-1222.9868,-10.8817,14.5854,44.3905,1,3); //Seasparrow AddStaticVehicle(447,-1185.6671,25.2180,14.5851,45.2634,1,3); //Seasparrow AddStaticVehicle(476,314.6721,2053.8909,17.6406,177.9970,2,1); //CombatPlane AddStaticVehicle(476,300.9214,2054.3667,18.3553,180.0973,2,1); //CombatPlane AddStaticVehicle(476,301.5647,2025.1053,18.3484,180.7421,2,1); //CombatPlane AddStaticVehicle(476,313.7102,2025.3872,18.3558,178.0725,2,1); //CombatPlane AddStaticVehicle(433,279.4970,2042.0854,17.6406,271.5008,2,1); //ArmyTruck AddStaticVehicle(447,345.8346,1988.5303,17.6406,85.6088,2,1); //Seasparrow AddStaticVehicle(447,345.5153,1977.6158,17.6406,91.1236,2,1); //Seasparrow SetTimer("GameModeExitFunc", gRoundTime, 0); return 1; } public OnPlayerConnect(playerid) { GameTextForPlayer(playerid,"The World Under War |DM|WR|",10000,5); SendClientMessage(playerid,0x0000BBAA,"---------------------------------------------------"); SendClientMessage(playerid,0x0000BBAA,"Welcome !!! The World Under War |DM|WR|"); SendClientMessage(playerid,0x0000BBAA,"---------------------------------------------------"); SendClientMessage(playerid,0xAA3333AA,"For help type /help."); GivePlayerMoney(playerid, 0); SetPlayerColor(playerid, 0xAFAFAFAA); // Set player color to grey return 1; } public OnPlayerSpawn(playerid) { SetPlayerInterior(playerid,0); if(gTeam[playerid] == USA) { SetPlayerColor(playerid,0x33CCFFAA); } else if(gTeam[playerid] == JAP) { SetPlayerColor(playerid,0xAA3333AA); } return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason); } else { if(gTeam[killerid] != gTeam[playerid]) { // Valid kill SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); GivePlayerMoney(killerid, 1000); } else { //TK! new warning[256]; format(warning, sizeof(warning), "Warning !!! You have been punished for team kill."); SendClientMessage(killerid, 0xFFFF00AA, warning); SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid, GetPlayerScore(killerid) - 1); } } 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 OnPlayerRequestClass(playerid, classid) { SetPlayerClass(playerid, classid); SetupPlayerForClassSelection(playerid); gPlayerClass[playerid] = classid; switch (classid) { case 0: { GameTextForPlayer(playerid, "~g~Americans", 500, 3); } case 1: { GameTextForPlayer(playerid, "~g~Americans", 500, 3); } case 2: { GameTextForPlayer(playerid, "~g~Americans", 500, 3); } case 3: { GameTextForPlayer(playerid, "~g~Americans", 500, 3); } case 4: { GameTextForPlayer(playerid, "~g~Japanese", 500, 3); } case 5: { GameTextForPlayer(playerid, "~g~Japanese", 500, 3); } case 6: { GameTextForPlayer(playerid, "~g~Japanese", 500, 3); } case 7: { GameTextForPlayer(playerid, "~g~Japanese", 500, 3); } } return 1; } //************************************************* public OnGameModeExit() { print("GameModeExit()"); return 1; } SetPlayerClass(playerid, classid) { if(classid == 0) { gTeam[playerid] = USA; } else if(classid == 1) { gTeam[playerid] = USA; } else if(classid == 2) { gTeam[playerid] = USA; } else if(classid == 3) { gTeam[playerid] = USA; } else if(classid == 4) { gTeam[playerid] = JAP; } else if(classid == 5) { gTeam[playerid] = JAP; } else if(classid == 6) { gTeam[playerid] = JAP; } else if(classid == 7) { gTeam[playerid] = JAP; } } public OnPlayerDisconnect(playerid) { printf("OnPlayerDisconnect(%d)", playerid); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/help", true)==0) { SendClientMessage(playerid,0xFF9900AA,"Available commands: /w , /c"); SendClientMessage(playerid,0xFF9900AA,"/pistol"); SendClientMessage(playerid,0xFF9900AA,"/m4a , /ak47"); return 1; } else if(strcmp(cmdtext, "/w", true) == 0) { SendClientMessage(playerid,0xFFFF00AA,"/w1 -> Cover Me"); SendClientMessage(playerid,0xFFFF00AA,"/w5 -> Follow Me"); SendClientMessage(playerid,0xFFFF00AA,"/w6 -> Taking Fire, Need Assistance"); return 1; } else if(strcmp(cmdtext, "/c", true) == 0) { SendClientMessage(playerid,0xFFFF00AA,"/c1 -> Affirmative"); SendClientMessage(playerid,0xFFFF00AA,"/c8 -> Negative"); SendClientMessage(playerid,0xFFFF00AA,"/c3 -> Need Backup"); SendClientMessage(playerid,0xFFFF00AA,"/c2 -> Enemy Spotted"); return 1; } else if(strcmp(cmdtext, "/w1", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Cover Me !", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/w5", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Follow Me", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/w6", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Taking Fire, Need Assistance", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/c1", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Affirmative", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/c2", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Enemy Spotted", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/c3", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Need Backup", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/c8", true) == 0) { if(gTeam[playerid] == USA) { COL_CMD = 0x33CCFFAA; } else if(gTeam[playerid] == JAP) { COL_CMD = 0xAA3333AA; } GetPlayerName(playerid,pname, sizeof(pname)); format(stringcmd, 256, "(%s): Negative", pname); SendClientMessageToAll(COL_CMD, stringcmd); return 1; } else if(strcmp(cmdtext, "/m4a", true) == 0) { if(gTeam[playerid] == JAP) { SendClientMessage(playerid, 0xAA3333AA, "You have to be a American"); return 1; } else if(gTeam[playerid] == USA) { GivePlayerWeapon(playerid, 31, 120); } return 1; } else if(strcmp(cmdtext, "/pistol", true) == 0) { GivePlayerWeapon(playerid, 22, 120); return 1; } else if(strcmp(cmdtext, "/ak47", true) == 0) { if(gTeam[playerid] == JAP) { GivePlayerWeapon(playerid, 30, 120); return 1; } else if(gTeam[playerid] == USA) { SendClientMessage(playerid, 0x33CCFFAA, "You have to be a Japanese"); return 1; } else if(strcmp(cmdtext, "/hp", true) == 0) { if(IsPlayerAdmin(playerid) == 1) { SetPlayerHealth(playerid, 100); return 1; } else { return 0; } return 1; } } return 0; }

Категория: SAMP modes | Добавил: gta-samp
Просмотров: 482 | Загрузок: 0 | Рейтинг: 0.0/0
Всего комментариев: 0
Имя *:
Email *:
Код *:

Вход на сайт

Поиск