RockStarGamer | Дата: Четверг, 03.04.2008, 16:43 | Сообщение # 6 |
Долгожитель
Группа:
Продвинутые
Сообщений: 1604
Награды: 1
Город: New York city
Репутация: 60
Замечания: 0%
Статус:
| Бег сиджея: UsePlayerPedAnims(); Общий вид исходника: Code #include <a_samp> #include <core> #include <float> #define Text_Draw "Police vs Russian" static gTeam[MAX_PLAYERS]; new gPlayerClass[MAX_PLAYERS]; #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_PINK 0xFF66FFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define POLICE 0 #define RUSSIAN 1 new gRoundTime = 3600000; main(){ print("\n----------------------------------"); print(" PORT by Wise (2008)\n"); print("----------------------------------\n");} public OnGameModeInit(){ SetGameModeText("Port"); SetTeamCount(7); ShowNameTags(1); UsePlayerPedAnims(); ShowPlayerMarkers(0); SetWorldTime(3); AddPlayerClass(285,2652.9119,-2503.9946,13.4922,269.2150,24,40,31,300,16,2); AddPlayerClass(280,2661.9155,-2405.2710,13.5447,269.3526,23,40,34,40,16,2); AddPlayerClass(286,2681.7080,-2450.8096,13.5273,264.7817,24,300,25,40,16,2); AddPlayerClass(127,2838.5664,-2519.8889,21.2115,4.1360,24,40,31,300,16,2); AddPlayerClass(126,2837.9792,-2448.1860,19.9220,86.3988,24,300,25,40,16,2); AddPlayerClass(125,2837.4324,-2371.3928,31.0078,177.2991,23,40,34,40,16,2); AddStaticVehicle(427,2648.0222,-2503.9458,13.6240,359.3524,0,1); AddStaticVehicle(596,2657.7083,-2404.6711,13.2345,356.8251,0,1); AddStaticVehicle(490,2683.5232,-2491.4656,13.6500,268.8160,0,0); AddStaticVehicle(490,2682.8804,-2418.5388,13.5989,270.7174,0,0); AddStaticVehicle(484,2720.3750,-2311.8164,0.2577,89.7418,50,32); AddStaticVehicle(484,2690.9333,-2311.6147,0.1276,89.0666,50,32); AddStaticVehicle(484,2700.5056,-2311.7625,0.1586,89.4575,50,32); AddStaticVehicle(484,2603.1997,-2319.1646,0.2424,90.3794,50,32); AddStaticVehicle(443,2659.1946,-2335.0896,14.2686,89.1692,20,1); AddStaticVehicle(456,2606.0791,-2375.4761,13.7574,182.7743,91,63); AddStaticVehicle(498,2618.3005,-2343.2805,13.6876,0.0542,13,120); AddStaticVehicle(498,2702.2859,-2343.1062,13.7010,2.9313,13,120); AddStaticVehicle(498,2707.6892,-2342.4382,13.7039,359.1200,13,120); AddStaticVehicle(498,2751.2283,-2345.0085,13.7005,270.7913,13,120); AddStaticVehicle(456,2751.9009,-2338.0933,13.8062,268.1190,102,65); AddStaticVehicle(433,2791.5571,-2343.0862,14.0695,179.0999,43,0); AddStaticVehicle(433,2782.7178,-2342.8062,14.0694,178.7195,43,0); AddStaticVehicle(470,2765.8625,-2351.9019,13.6264,268.0547,43,0); AddStaticVehicle(470,2765.4326,-2360.1296,13.6273,268.5464,43,0); AddStaticVehicle(470,2764.8796,-2386.3796,13.6256,179.6653,43,0); AddStaticVehicle(498,2725.3035,-2395.0476,13.6990,180.2062,20,117); AddStaticVehicle(489,2738.2019,-2428.6794,13.7822,356.0392,14,123); AddStaticVehicle(498,2776.4907,-2435.9758,13.7044,88.5787,24,112); AddStaticVehicle(498,2777.1697,-2474.2363,13.7032,88.7693,24,112); AddStaticVehicle(498,2793.0132,-2536.2646,13.6989,357.9269,24,112); AddStaticVehicle(498,2777.7251,-2511.6514,13.7020,87.5199,24,112); AddStaticVehicle(498,2739.8584,-2491.0950,13.7295,179.2173,24,112); AddStaticVehicle(489,2729.0244,-2496.4353,13.8068,269.9570,112,120); AddStaticVehicle(489,2748.3796,-2467.0894,13.7924,358.7745,112,120); AddStaticVehicle(456,2783.0989,-2494.1226,13.8294,89.5114,102,65); AddStaticVehicle(498,2783.9714,-2456.0508,13.7017,89.6464,20,117); CreateObject(987,2821.162109,-2393.210009,10.771362,-84.000000,0.000000,92.343177); CreateObject(987,2816.747070,-2393.972656,11.231102,-76.000000,0.000000,92.343177); CreateObject(987,2820.901123,-2442.033935,10.818861,-81.000000,0.000000,89.559791); CreateObject(987,2816.132324,-2442.033935,11.401912,-79.000000,1.000000,89.559791); CreateObject(984,2815.413330,-2381.665527,12.106206,-189.000000,-182.000000,271.906524); CreateObject(984,2815.386474,-2393.722900,12.106206,-189.000000,-182.000000,271.906524); CreateObject(984,2815.386474,-2431.810546,12.106206,-189.000000,-182.000000,268.906524); CreateObject(984,2815.386474,-2442.071289,12.106206,-189.000000,-182.000000,268.906524); CreateObject(979,2640.513427,-2503.834472,13.285326,0.000000,0.000000,267.374206); CreateObject(979,2643.587646,-2403.404785,13.139221,0.000000,0.000000,266.747589); CreateObject(967,2667.104248,-2413.566894,12.662728,0.000000,0.000000,358.660522); SetTimer("GameModeExitFunc", gRoundTime, 0); return 1;} public OnPlayerConnect(playerid){ new Text:text = TextDrawCreate(480.0, 420.0,Text_Draw); TextDrawUseBox(text, 0); TextDrawFont(text, 3); TextDrawSetShadow(text,1); TextDrawSetOutline(text,1); TextDrawBackgroundColor(text,0x000000FF); TextDrawColor(text,0xFFFFFFFF); TextDrawShowForPlayer(playerid, text); new PlayerName[30], str[256]; GetPlayerName(playerid,PlayerName,16); format(str, 256, "%s(%d) приcoeдиняется к серверу.", PlayerName, playerid); SendClientMessageToAll(0x10F441AA, str); return 1; GameTextForPlayer(playerid,"Port",2500,5); SetPlayerColor(playerid, COLOR_GREY); return 1;} public OnPlayerDisconnect(playerid, reason){ new PlayerName[30], str[256]; GetPlayerName(playerid,PlayerName,16); format(str, 256, "%s(%d) покидает сервер.", PlayerName, playerid); SendClientMessageToAll(0xAA3333AA, str); return 1; GameTextForPlayer(playerid,"Port",2500,5); return 1;} public OnPlayerSpawn(playerid){ new n; new p = 700; while(n <= p){ new ni; new pi = 15; while(ni <= pi){ SetVehicleParamsForPlayer(n,ni,0,1); ni++;} n++;} new PlayerName[30], str[256]; new Float:armour; new Float:health; SetPlayerInterior(playerid,0); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); GivePlayerWeapon(playerid, 29, 300); SetCameraBehindPlayer(playerid); SetPlayerMapIcon(playerid, 1, 2681.7080,-2450.8096,13.5273, 58, 1); SetPlayerMapIcon(playerid, 2, 2837.9792,-2448.1860,19.9220, 60, 1); SetPlayerWorldBounds(playerid,2960.4685,2373.1936,-2214.0295,-2647.4673); if(gTeam[playerid] == POLICE) { SetPlayerColor(playerid,0x33CCFFAA);} else if(gTeam[playerid] == RUSSIAN) { SetPlayerColor(playerid,0xFFFF00AA);} return 1;} public OnPlayerDeath(playerid, killerid, reason) {if(killerid == INVALID_PLAYER_ID) { SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);} else {if(gTeam[killerid] != gTeam[playerid]) { SendDeathMessage(killerid,playerid,reason); SetPlayerScore(killerid,GetPlayerScore(killerid)+1);}} return 1;} public SetupPlayerForClassSelection(playerid){ SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2692.4880,-2387.3489,13.6328); SetPlayerFacingAngle(playerid, 176.6665); SetPlayerCameraPos(playerid,2692.3328,-2390.7656,14.8328); SetPlayerCameraLookAt(playerid,2692.4880,-2387.3489,13.6328);} public OnPlayerCommandText(playerid, cmdtext[]){ if (strcmp(cmdtext, "/kill", true)==0){ SetPlayerHealth(playerid, 0); return 1;} return 0;} public OnPlayerText(playerid,text[]){ if(text[0] == '!'){ new name[24], string[256]; GetPlayerName(playerid, name, 24); format(string, sizeof(string), "Team %s: %s", name, text[1]); printf("%s", string); for(new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)){ if(gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);}} return 0;} return 1;} public OnPlayerRequestClass(playerid, classid){ SetPlayerClass(playerid, classid); SetupPlayerForClassSelection(playerid); gPlayerClass[playerid] = classid; switch (classid) { case 0:{GameTextForPlayer(playerid, "~g~Police", 500, 3);} case 1:{GameTextForPlayer(playerid, "~g~Police", 500, 3);} case 2:{GameTextForPlayer(playerid, "~g~Police", 500, 3);} case 3:{GameTextForPlayer(playerid, "~g~Russian", 500, 3);} case 4:{GameTextForPlayer(playerid, "~g~Russian", 500, 3);} case 5:{GameTextForPlayer(playerid, "~g~Russian", 500, 3);}} return 1;} SetPlayerClass(playerid, classid) { if(classid == 0 || classid == 1 || classid == 2) {gTeam[playerid] = POLICE;} else if(classid == 3 || classid == 4 || classid == 5) {gTeam[playerid] = RUSSIAN;}}
|
|
|
|