30.08.2011, 18:57
Olб pessoal..
Baixei na internet, um gamemode, so que, toda vez que ele liga, e alguem loga na rcon o server cai..
diz que o server parou de responder..
tentei tirar todos os filterscripts, e so logar na rcon pra ver, o server ainda cai..
Ta ai o gamemode :
Alguem pode tirar os bugs? :\
Grato *-*
Pra quem tirar os bugs, add ai : glu.sci@hotmail.com
eu do adm 10 no server *-*
Valeu ai!
Baixei na internet, um gamemode, so que, toda vez que ele liga, e alguem loga na rcon o server cai..
diz que o server parou de responder..
tentei tirar todos os filterscripts, e so logar na rcon pra ver, o server ainda cai..
Ta ai o gamemode :
Код HTML:
new Text:Time; new DMTime; #include <a_samp> #include <morphinc> #define TEAM_BOPE 1 #define TEAM_FAVELA 2 #define PocketMoney 500 // Amount player recieves on spawn. #define CHECKPOINT_NONE 0 #define CHECKPOINT_FAVELA1 1 #define CHECKPOINT_FAVELA2 2 #define CHECKPOINT_FAVELA3 3 #define CHECKPOINT_FAVELA4 4 #define CHECKPOINT_FAVELA5 5 #define FAVELA_WIN 0 #define BOPE_WIN 1 #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_FADE1 0xE6E6E6E6 #define COLOR_FADE2 0xC8C8C8C8 #define COLOR_FADE3 0xAAAAAAAA #define COLOR_FADE4 0x8C8C8C8C #define COLOR_FADE5 0x6E6E6E6E #define COLOR_RED 0xAA3333AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_YELLOW 0xFFFF00AA #define RADIO_COLOR 0x8D8DFF00 #define BOPE_COLOR 0x0000BBAA #define COLOR_ADD 0x63FF60AA #define FAVELA_COLOR 0xAA3333AA forward FavelaWin(); forward GameModeExitFunc(); new gTeam[MAX_PLAYERS]; new gMaconha[MAX_PLAYERS]; new gPlayerClass[MAX_PLAYERS]; new BigEar[MAX_PLAYERS]; new Normal[MAX_PLAYERS]; new Gritar[MAX_PLAYERS]; new Radio[MAX_PLAYERS]; new Baixo[MAX_PLAYERS]; new gPlayerCheckpointStatus[MAX_PLAYERS]; forward SetPlayerRandomSpawn(playerid); forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5); forward SendTeamMessage(team, color, string[]); forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z); forward ProxDetectorS(Float:radi, playerid, targetid); new Float:gFavela[23][3] = { {-2442.228,-350.920,62.874}, {-2431.326,-337.172,61.403}, {-2409.074,-361.110,74.626}, {-2389.444,-388.966,77.041}, {-2405.389,-388.227,82.726}, {-2448.050,-374.236,70.647}, {-2438.360,-377.239,70.808}, {-2510.010,-333.947,58.025}, {-2527.887,-350.240,65.306}, {-2533.980,-342.328,57.697}, {-2500.676,-336.720,58.871}, {-2510.601,-375.079,81.230}, {-2454.657,-349.984,61.519}, {-2481.781,-353.722,63.497}, {-2488.105,-376.357,63.661}, {-2549.258,-378.894,54.039}, {-2339.580,-431.163,79.474}, {-2346.699,-426.809,80.272}, {-2309.939,-433.501,78.559}, {-2337.877,-474.425,80.298}, {-2400.224,-381.360,74.379}, {-2406.625,-393.012,75.088}, {-2435.142,-384.168,74.024} }; new Float:gBope[5][3] = { {-2094.3259,-124.4409,35.3203}, {-2093.5264,-121.9008,35.3203}, {-2093.7808,-117.8601,35.3203}, {-2093.6128,-114.7550,35.3203}, {-2088.0259,-113.8166,35.3203} }; new gCarros[15][1] = { {404},{412},{543},{419},{439},{463},{466}, {467},{474},{483},{491},{580},{540},{542},{549}}; //--------------------------------------------------------- main() { print("\n----------------------------------"); print(" Policia x Traficante "); print("----------------------------------\n"); } //--------------------------------------------------------- forward DMTimer(playerid); stock TimeConvert(seconds) { new tmp[256]; new minutes = floatround(seconds/60); seconds -= minutes*60; format(tmp, sizeof(tmp), "%d:%02d", minutes, seconds); return tmp; } public OnGameModeInit() { CreateObject(3167,-2530.891,-452.404,69.610,2.578,-1.719,-72.193); CreateObject(3169,-2521.053,-445.709,69.966,13.751,0.0,-155.558); CreateObject(3170,-2531.544,-449.440,69.142,-2.578,4.297,-249.237); CreateObject(3173,-2531.222,-450.399,71.674,-5.157,0.0,18.908); CreateObject(3241,-2524.268,-432.376,67.581,-16.329,0.0,25.783); CreateObject(3242,-2539.637,-433.982,70.786,-15.470,-1.719,24.064); CreateObject(3246,-2516.708,-444.182,71.195,-12.032,6.875,111.727); CreateObject(3250,-2546.028,-440.860,64.753,-17.189,0.0,27.502); CreateObject(3253,-2523.724,-431.875,71.033,-13.751,10.313,24.924); CreateObject(3283,-2508.208,-438.750,73.358,6.875,-24.064,-60.161); CreateObject(3284,-2535.311,-440.007,74.407,-5.157,-8.594,-71.333); CreateObject(3171,-2534.886,-440.946,75.756,-7.735,-178.763,18.908); CreateObject(3171,-2537.290,-441.739,75.798,-7.735,-178.763,-342.056); CreateObject(3171,-2538.428,-438.701,75.271,-7.735,-177.044,-338.618); CreateObject(3171,-2535.881,-438.002,74.939,-7.735,-178.763,-340.337); CreateObject(3171,-2533.984,-440.213,75.229,0.0,-185.638,-431.437); CreateObject(3171,-2534.441,-438.910,75.004,-0.859,-185.638,-432.296); CreateObject(3285,-2513.184,-430.206,71.420,-18.048,0.0,29.221); CreateObject(3355,-2560.177,-444.659,64.493,-14.610,0.0,25.783); CreateObject(3356,-2537.824,-434.401,69.497,-19.767,-2.578,31.799); CreateObject(3362,-2539.999,-454.605,69.094,3.438,0.0,-74.771); CreateObject(3414,-2501.569,-428.906,75.438,-8.594,15.470,117.657); CreateObject(3415,-2561.096,-430.215,60.373,-7.735,-2.578,35.237); CreateObject(3415,-2569.255,-435.938,59.881,-17.189,3.438,35.237); CreateObject(3415,-2561.010,-430.193,60.448,-7.735,-183.060,33.518); CreateObject(3417,-2501.687,-429.192,77.099,-22.345,16.329,122.899); CreateObject(3418,-2445.436,-410.275,86.393,1.719,-2.578,13.751); CreateObject(3418,-2445.319,-410.112,82.185,1.719,-181.341,13.751); CreateObject(3556,-2504.234,-463.879,75.218,0.0,-7.735,18.908); CreateObject(3589,-2504.736,-464.432,79.021,-6.016,-8.594,17.189); CreateObject(3590,-2513.016,-469.043,74.291,0.0,-3.438,17.189); CreateObject(3599,-2487.970,-460.386,81.821,0.0,11.173,-160.715); CreateObject(3613,-2528.380,-478.646,73.543,0.0,0.0,-169.309); CreateObject(3614,-2517.641,-474.983,78.685,0.0,0.0,-79.928); CreateObject(3626,-2607.408,-366.139,43.106,0.0,-11.173,13.751); CreateObject(3634,-2605.535,-386.838,44.186,4.297,11.173,-165.872); CreateObject(3635,-2588.910,-383.235,48.569,12.032,-12.032,-79.928); CreateObject(3639,-2596.546,-389.922,53.045,7.735,12.892,188.672); CreateObject(3640,-2529.291,-345.726,60.758,0.0,-4.297,-89.381); CreateObject(3641,-2567.634,-383.667,51.857,-3.438,-8.594,5.157); CreateObject(1412,-2577.627,-376.338,48.473,0.0,-6.016,5.157); CreateObject(5152,-2557.834,-433.152,60.980,0.0,30.080,-233.767); CreateObject(5152,-2556.145,-431.915,60.987,0.0,30.080,-233.767); CreateObject(850,-2611.059,-372.054,40.865,0.0,-15.470,18.048); CreateObject(910,-2611.110,-377.890,40.787,-84.225,-12.892,42.112); CreateObject(924,-2610.099,-378.705,40.658,0.0,0.0,0.0); CreateObject(924,-2609.854,-376.796,40.836,0.0,0.0,0.0); CreateObject(924,-2609.712,-374.572,41.032,116.883,40.394,43.831); CreateObject(924,-2610.242,-377.662,40.590,0.0,0.0,0.0); CreateObject(924,-2610.159,-377.421,41.032,0.0,0.0,0.0); CreateObject(924,-2609.957,-378.259,41.220,0.0,-25.783,4.297); CreateObject(926,-2611.877,-371.910,40.847,0.0,0.0,0.0); CreateObject(926,-2611.587,-377.165,40.627,0.0,-85.944,0.0); CreateObject(939,-2604.572,-370.018,42.474,-100.554,-317.991,97.976); CreateObject(3642,-2554.481,-379.076,54.393,-10.313,2.578,-266.562); CreateObject(3614,-2527.983,-334.260,52.369,0.0,0.0,-82.506); CreateObject(3363,-2539.893,-377.253,54.212,-5.157,-8.594,0.0); CreateObject(3644,-2566.194,-404.477,53.354,11.173,-5.157,-84.766); CreateObject(3646,-2540.396,-389.645,59.590,-10.313,-11.173,0.0); CreateObject(3648,-2526.847,-379.379,60.226,-9.454,-11.173,0.0); CreateObject(3649,-2512.609,-348.531,60.618,-5.157,-6.016,0.0); CreateObject(5153,-2522.338,-340.103,59.962,-2.578,27.502,6.016); CreateObject(3651,-2596.292,-396.439,50.313,-10.313,-8.594,11.173); CreateObject(1633,-2013.970,-277.190,39.496,0.0,0.0,-179.622); CreateObject(1633,-2018.075,-277.223,39.521,0.0,0.0,-179.622); CreateObject(1633,-2022.190,-277.204,39.496,0.0,0.0,-179.622); CreateObject(1633,-2026.345,-277.235,39.503,0.0,0.0,-179.622); CreateObject(1633,-2030.497,-277.171,39.521,0.0,0.0,-179.622); CreateObject(1633,-2034.658,-277.143,39.521,0.0,0.0,-179.622); CreateObject(1633,-2013.997,-269.040,37.178,0.0,0.0,-179.622); CreateObject(1633,-2018.094,-269.072,37.196,0.0,0.0,-179.622); CreateObject(1633,-2022.240,-269.113,37.196,0.0,0.0,-179.622); CreateObject(1633,-2030.495,-269.164,37.228,0.0,0.0,-179.622); CreateObject(1633,-2026.363,-269.125,37.203,0.0,0.0,-179.622); CreateObject(1633,-2034.737,-269.206,37.346,0.0,0.0,-179.622); CreateObject(1633,-2014.039,-260.929,34.896,0.0,0.0,-179.622); CreateObject(1633,-2022.253,-261.009,34.946,0.0,0.0,-179.622); CreateObject(1633,-2026.358,-262.544,35.371,0.0,0.0,-179.622); CreateObject(1633,-2018.153,-261.070,34.946,0.0,0.0,-179.622); CreateObject(1633,-2030.411,-262.326,35.328,0.0,0.0,-179.622); CreateObject(1633,-2034.571,-262.475,35.371,0.0,0.0,-179.622); CreateObject(1451,-2564.538,-390.883,51.028,0.0,0.0,-176.185); CreateObject(3655,-2511.416,-379.738,62.680,-11.173,-4.297,-0.859); CreateObject(3655,-2511.924,-378.323,69.943,-11.173,-4.297,-0.859); CreateObject(3655,-2512.448,-376.867,77.108,-11.173,-4.297,-0.859); CreateObject(5822,-2505.900,-374.471,71.962,5.157,-6.875,-88.522); CreateObject(3419,-2500.521,-337.919,58.279,-2.578,-9.454,-0.859); CreateObject(16406,-2492.748,-376.245,67.142,0.859,13.751,-181.719); CreateObject(3359,-2511.472,-332.100,56.525,0.0,0.0,4.297); CreateObject(2931,-2504.094,-378.464,78.118,-36.956,1.719,265.566); CreateObject(3697,-2469.219,-381.709,70.286,0.0,-9.454,0.0); CreateObject(3697,-2470.019,-381.748,75.382,0.0,-9.454,0.0); CreateObject(3698,-2480.650,-333.508,60.696,-5.157,-0.859,-11.250); CreateObject(3700,-2481.055,-351.358,64.462,-21.486,-9.454,-9.531); CreateObject(3759,-2471.532,-377.022,82.087,7.735,9.454,-180.000); CreateObject(3762,-2466.802,-342.712,62.611,0.0,-8.594,-101.250); CreateObject(3765,-2478.019,-400.252,76.053,-14.610,6.875,56.250); CreateObject(3821,-2451.300,-345.708,65.643,0.0,0.0,-281.250); CreateObject(3822,-2404.822,-361.096,75.895,0.0,0.0,-9.531); CreateObject(3823,-2517.575,-398.150,69.825,21.486,10.313,-191.250); CreateObject(3824,-2532.159,-402.773,63.317,13.751,1.719,-180.000); CreateObject(3825,-2446.150,-378.821,74.004,0.0,0.0,-101.250); CreateObject(3826,-2434.165,-380.255,75.575,0.0,-7.735,-4.297); CreateObject(3827,-2477.219,-417.199,82.575,10.313,13.751,-180.000); CreateObject(3828,-2406.028,-384.235,76.412,0.0,-1.719,-101.250); CreateObject(3829,-2406.882,-392.243,82.862,0.0,0.0,-101.250); CreateObject(4178,-2429.659,-336.041,64.534,2.578,4.297,-191.250); CreateObject(5060,-2385.547,-396.639,79.563,2.578,-8.594,-111.322); CreateObject(5341,-2372.356,-405.918,80.826,0.0,5.157,-297.657); CreateObject(5416,-2358.755,-422.003,81.865,0.0,9.454,45.000); CreateObject(5520,-2342.272,-434.600,84.384,6.875,0.859,-213.140); CreateObject(5626,-2308.339,-433.105,79.779,-14.610,0.859,-73.516); CreateObject(5642,-2382.966,-486.039,96.772,10.313,-7.735,-182.656); CreateObject(6133,-2425.067,-464.333,92.065,9.454,-0.859,-191.250); CreateObject(6921,-2429.499,-451.487,103.040,9.454,0.0,-191.250); CreateObject(9227,-2438.618,-433.813,87.297,6.875,-18.048,-90.000); CreateObject(9228,-2452.158,-435.517,84.802,-0.859,14.610,112.500); CreateObject(9327,-2407.710,-426.785,85.383,6.016,6.875,-281.250); CreateObject(11433,-2321.592,-465.965,80.549,-11.173,0.0,-146.250); CreateObject(11501,-2334.969,-450.547,78.826,0.0,0.0,-56.250); CreateObject(11502,-2356.305,-441.138,79.770,0.0,0.0,-146.250); CreateObject(11503,-2347.527,-450.309,80.140,7.735,0.0,-22.500); CreateObject(12937,-2428.417,-429.438,87.807,8.594,0.0,-168.750); CreateObject(12991,-2417.333,-408.032,84.666,-4.297,2.578,-90.000); CreateObject(13687,-2463.795,-451.072,85.901,-9.454,0.859,-157.500); CreateObject(13695,-2548.439,-481.648,68.808,0.0,0.0,0.0); CreateObject(16105,-2528.007,-419.145,70.325,0.0,-6.875,18.048); CreateObject(16285,-2457.813,-412.257,80.991,-32.659,0.0,36.096); CreateObject(17573,-2339.488,-475.218,81.441,0.0,-7.735,-90.000); CreateObject(17698,-2337.167,-477.801,85.338,0.0,0.0,0.0); CreateObject(17697,-2377.598,-454.286,87.245,0.0,19.767,-315.000); CreateObject(17699,-2356.615,-484.141,93.504,0.0,21.486,-281.250); CreateObject(17934,-2445.620,-351.572,64.043,0.0,0.0,-191.250); CreateObject(18259,-2570.541,-468.631,68.873,0.0,0.0,180.000); CreateObject(972,-2023.789,-331.882,34.425,0.0,0.0,0.0); CreateObject(972,-2023.815,-356.933,34.612,0.0,0.0,0.0); CreateObject(972,-2032.280,-373.684,34.481,0.0,0.0,-45.000); CreateObject(972,-2041.328,-388.485,34.333,0.0,0.0,-11.250); CreateObject(972,-2023.948,-376.290,25.721,0.0,0.0,-33.450); CreateObject(972,-2002.747,-277.229,33.392,0.0,0.0,-146.250); CreateObject(972,-2010.214,-298.405,33.291,0.0,0.0,-45.000); CreateObject(972,-2019.651,-314.073,34.216,0.0,0.0,-22.500); CreateObject(972,-2025.519,-378.196,30.473,0.0,0.0,-33.673); CreateObject(972,-2211.947,-274.462,33.417,0.0,0.0,-270.000); CreateObject(972,-2238.137,-267.956,34.309,0.0,0.0,-90.000); CreateObject(972,-2124.213,-379.436,34.333,0.0,0.0,-135.000); CreateObject(972,-2113.305,-390.727,34.501,0.0,0.0,-123.750); CreateObject(972,-2140.678,-365.910,34.777,0.0,0.0,-123.750); CreateObject(972,-2163.214,-354.834,34.882,0.0,0.0,-110.858); CreateObject(972,-2186.675,-351.379,38.771,0.0,0.0,-90.232); CreateObject(972,-2168.468,-352.679,35.608,55.863,0.0,-108.280); CreateObject(972,-2212.473,-313.908,35.481,0.0,0.0,-180.782); SetGameModeText("[2011]Policia x Traficante"); ShowNameTags(1); ShowPlayerMarkers(0); SetWorldTime(12); UsePlayerPedAnims(); DisableInteriorEnterExits(); SetPDistance(10); // Configuraзгo: // DMTime = 1800; // Round time - 30 mins // DMTime = 1200; // Round time - 20 mins DMTime = 900; // Round time - 15 mins // DMTime = 600; // Round time - 10 mins // DMTime = 300; // Round time - 5 mins // DMTime = 120; // Round time - 2 mins // DMTime = 60; // Round time - 1 min AddStaticVehicle(597,-2090.5935,-139.5530,35.0474,272.7804,0,0); // police car /* AddStaticVehicle(427,-2084.328,-109.468,35.568,180.0,0,0); AddStaticVehicle(427,-2079.328,-109.468,35.568,180.0,0,0); AddStaticVehicle(427,-2074.251,-109.468,35.568,180.0,0,0);*/ AddStaticVehicle(427,-2084.328,-116.468,35.0,180.0,0,0); AddStaticVehicle(427,-2079.328,-116.468,35.0,180.0,0,0); AddStaticVehicle(427,-2074.251,-116.468,35.0,180.0,0,0); AddStaticVehicle(599,-2069.911,-109.468,35.568,180.0,0,0); AddStaticVehicle(599,-2064.425,-109.468,35.568,180.0,0,0); AddStaticVehicle(599,-2059.505,-109.468,35.568,180.0,0,0); AddStaticVehicle(490,-2054.240,-109.468,35.568,180.0,0,0); AddStaticVehicle(490,-2049.026,-109.468,35.568,180.0,0,0); AddStaticVehicle(490,-2044.664,-109.468,35.568,180.0,0,0); AddStaticVehicle(490,-2039.278,-109.468,35.568,180.0,0,0); new rand1 = random(sizeof(gCarros)); new rand2 = random(sizeof(gCarros)); new rand3 = random(sizeof(gCarros)); new rand4 = random(sizeof(gCarros)); new rand5 = random(sizeof(gCarros)); new rand6 = random(sizeof(gCarros)); new rand7 = random(sizeof(gCarros)); new rand9 = random(sizeof(gCarros)); new rand10 = random(sizeof(gCarros)); new rand11 = random(sizeof(gCarros)); new rand12 = random(sizeof(gCarros)); new rand13 = random(sizeof(gCarros)); new rand14 = random(sizeof(gCarros)); new rand15 = random(sizeof(gCarros)); new rand16 = random(sizeof(gCarros)); new rand17 = random(sizeof(gCarros)); new rand18 = random(sizeof(gCarros)); new rand19 = random(sizeof(gCarros)); AddStaticVehicle(gCarros[rand1][0],-2331.274,-441.786,79.811,271.0,-1,-1); // spawnpoint (23) AddStaticVehicle(gCarros[rand2][0],-2313.540,-443.498,79.649,89.0,-1,-1); // spawnpoint (24) AddStaticVehicle(gCarros[rand3][0],-2591.539,-382.139,45.659,11.0,-1,-1); // spawnpoint (25) AddStaticVehicle(gCarros[rand4][0],-2545.028,-380.513,54.927,358.0,-1,-1); // spawnpoint (26) AddStaticVehicle(gCarros[rand5][0],-2542.516,-402.589,59.715,33.0,-1,-1); // spawnpoint (27) AddStaticVehicle(gCarros[rand6][0],-2500.451,-340.915,59.353,181.0,-1,-1); // spawnpoint (28) AddStaticVehicle(gCarros[rand7][0],-2419.421,-379.738,73.218,338.0,-1,-1); // spawnpoint (29) AddStaticVehicle(gCarros[rand9][0],-2510.523,-388.905,60.972,271.0,-1,-1); // spawnpoint (31) AddStaticVehicle(gCarros[rand10][0],-2379.964,-397.929,78.312,327.0,-1,-1); // spawnpoint (32) AddStaticVehicle(gCarros[rand11][0],-2391.044,-399.887,80.082,67.0,-1,-1); // spawnpoint (33) AddStaticVehicle(gCarros[rand12][0],-2343.177,-453.545,80.059,179.0,-1,-1); // spawnpoint (34) AddStaticVehicle(gCarros[rand13][0],-2354.522,-439.635,81.939,126.0,-1,-1); // spawnpoint (35) AddStaticVehicle(gCarros[rand14][0],-2508.281,-444.266,74.612,293.0,-1,-1); // spawnpoint (37) AddStaticVehicle(gCarros[rand15][0],-2500.786,-430.668,74.640,203.0,-1,-1); // spawnpoint (38) AddStaticVehicle(gCarros[rand16][0],-2540.946,-450.417,69.162,112.0,-1,-1); // spawnpoint (39) AddStaticVehicle(gCarros[rand17][0],-2513.686,-418.002,71.381,293.0,-1,-1); // spawnpoint (40) AddStaticVehicle(gCarros[rand18][0],-2432.693,-428.399,85.709,11.0,-1,-1); // spawnpoint (41) AddStaticVehicle(gCarros[rand19][0],-2407.931,-432.468,86.417,259.0,-1,-1); // spawnpoint (42) AddPlayerClass(285,-2094.3259,-124.4409,35.3203,263.0956,3,1,24,100,0,0); // bope 1 AddPlayerClass(284,-2093.5264,-121.9008,35.3203,261.7170,3,1,24,100,0,0); // bope 2 AddPlayerClass(280,-2093.7808,-117.8601,35.3203,261.7170,3,1,24,100,0,0); // bope 3 AddPlayerClass(286,-2093.6128,-114.7550,35.3203,235.6045,3,1,24,100,0,0); // bope 4 // Defence team AddPlayerClass(47,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(111,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(112,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(116,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(108,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(107,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(123,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(125,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(179,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army AddPlayerClass(292,245.1233,1859.1162,14.0840,358.717, 5,1,24,100,0,0); // Army // Pickups AddStaticPickup(348,1,-2093.4849,-106.4410,35.3203);//deagle AddStaticPickup(356,1,-2090.7937,-106.4410,35.3203);//m4 AddStaticPickup(357,1,-2087.0874,-106.4410,35.3203);//rifle AddStaticPickup(349,1,-2093.9216,-111.0341,35.3203);//shotgun AddStaticPickup(342,1,-2087.3335,-110.8945,35.3203);//grenade AddStaticPickup(353,1,-2093.7100,-114.3213,35.3203);//mp5 AddStaticPickup(1242,1,-2090.3850,-111.6046,35.3203);//colete AddStaticPickup(348,1,-2420.7698,-335.2537,62.3079);//deagle AddStaticPickup(355,1,-2420.7698,-337.5442,62.4609);//ak47 AddStaticPickup(358,1,-2420.7698,-339.9688,62.5826);//sniper AddStaticPickup(352,1,-2423.5852,-333.3671,62.0140);//uzi AddStaticPickup(350,1,-2426.2629,-338.9652,62.1623);//sawnoff AddStaticPickup(344,1,-2423.5376,-339.7253,62.3911);//molotov AddStaticPickup(1254,1,-2558.1787,-448.5563,67.0477);//maconha return 1; } //--------------------------------------------------------- public DMTimer() { DMTime --; new tmp[256]; TextDrawDestroy(Text:Time); format(tmp, sizeof tmp, "%s", TimeConvert(DMTime)); Time = TextDrawCreate(300.0, 10.0, tmp); TextDrawUseBox(Text:Time, 1); TextDrawTextSize(Text:Time, 350.0, 30.0); TextDrawSetShadow(Text:Time, 0); TextDrawSetOutline(Text:Time, 1); TextDrawShowForAll(Text:Time); if (DMTime < 0.1) { EndTheRound(FAVELA_WIN); return 1; } return 0; } //--------------------------------------------------------- public OnPlayerConnect(playerid) { new plname[MAX_PLAYER_NAME]; new string[MAX_PLAYER_NAME]; GetPlayerName(playerid, plname, sizeof(plname)); format(string, sizeof(string), "%s entrou no jogo.",plname); SendClientMessageToAll(COLOR_ADD, string); format(string, sizeof(string), "[2011] Policia x Traficante : %s entrou no jogo.",plname); printf("%s",string); GameTextForPlayer(playerid,"~b~Policias ~g~VS ~r~Traficantes ~w~v2011",5000,3); SendClientMessage(playerid,COLOR_YELLOW,"[2011] Policia x Traficante : Bem-Vindo, digite /ajuda."); BigEar[playerid] = 0; Normal[playerid] = 1; Gritar[playerid] = 0; Radio[playerid] = 0; Baixo[playerid] = 0; GivePlayerMoney(playerid, PocketMoney); return 1; } public OnPlayerDisconnect(playerid) { new plname[MAX_PLAYER_NAME]; new string[MAX_PLAYER_NAME]; GetPlayerName(playerid, plname, sizeof(plname)); format(string, sizeof(string), "[2011] Policia x Traficante : %s saiu do jogo.",plname); SendClientMessageToAll(COLOR_ADD, string); format(string, sizeof(string), "[2011] Policia x Traficante : %s[%d] saiu do jogo.",plname,playerid); printf("%s",string); return 1; } //--------------------------------------------------------- SetupPlayerForClassSelection(playerid) { SetPlayerInterior(playerid,8); SetPlayerFacingAngle(playerid,280.0); SetPlayerPos(playerid,2806.69,-1171.72,1025.07); SetPlayerCameraPos(playerid,2809.3428,-1170.4800,1025.5703); SetPlayerCameraLookAt(playerid,2805.69,-1171.72,1025.07); return; } //--------------------------------------------------------- SetPlayerTeamFromClass(playerid, classid) { if(classid == 0 || classid == 1 || classid == 2 || classid == 3) { gTeam[playerid] = TEAM_BOPE; } else if(classid == 4 || classid == 5 || classid == 6 || classid == 7 || classid == 8 || classid == 9 || classid == 10 || classid == 11 || classid == 12 || classid == 13) { gTeam[playerid] = TEAM_FAVELA; } } //--------------------------------------------------------- public OnPlayerCommandText(playerid, cmdtext[]) { new string[256]; new playermoney; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new tmp[256]; new cmd[256]; new giveplayerid, moneys, idx; new playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); printf( "Comando %s, %s)", playername, cmdtext ); //in the sa-mp-server.exe you can see what the players type in! cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/ajuda", true) == 0) { SendClientMessage(playerid, COLOR_YELLOW,"O Game Mode [2011]Policia x Traficante e para vocкs se divertirem!"); SendClientMessage(playerid, COLOR_YELLOW,"/objetivo: Vк o objetivo do game mode de acordo com sua Equipe."); SendClientMessage(playerid, COLOR_YELLOW,"/dardinheiro [id do jogador] [dinheiro]: enviar dinheiro para outro jogador."); SendClientMessage(playerid, COLOR_YELLOW,"/info: Vк as informaзхes da arma que vocк pode comprar. Nome/Muniзгo/Preзo."); SendClientMessage(playerid, COLOR_YELLOW,"/comprar: Compra a arma. Deve-se estar no local da arma."); SendClientMessage(playerid, COLOR_YELLOW,"/r ou /radio: Ativa/Desativa a sua voz no rбdio. Com ele ativado todos da sua equipe escutarгo o que vocк falar."); SendClientMessage(playerid, COLOR_YELLOW,"/b ou /baixo: Ativa o Modo Falar Baixo. Quando vocк falar algo somente quem estiver mais prуximo poderб ouvir"); SendClientMessage(playerid, COLOR_YELLOW,"/g ou /gritar: Ativa o Modo Gritar. Serve para falar com pessoas que estгo um pouco longe de vocк ou..."); SendClientMessage(playerid, COLOR_YELLOW,"/n ou /normal: Ativa o Modo normal da falar com as pessoas prуximas"); if(IsPlayerAdmin(playerid)) { SendClientMessage(playerid, COLOR_YELLOW,"Admin: /ouvirtudo /dia /noite /dinheiro"); } return 1; } if(strcmp(cmd, "/dinheiro", true) == 0 && IsPlayerAdmin(playerid)) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /dinheiro [id] [dinheiro]"); return 1; } new playa; new money; playa = strval(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GivePlayerMoney(playa, money); } } } return 1; } if(strcmp(cmd, "/iddocarro", true) == 0) { new carid = GetPlayerVehicleID(playerid); format(string, sizeof(string), "[2011] Policia x Traficante : O ID deste carro й: %d",carid); SendClientMessage(playerid, COLOR_GREY, string); return 1; } if(strcmp(cmd, "/info", true) == 0) { new i = playerid; if (PlayerToPoint(2.0, i, -2093.4849,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~w~Desert Eagle/100 tiros por R$450~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2090.7937,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~b~M4~w~/250 tiros por R$3000~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2087.0874,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~r~Rifle~w~/30 tiros por R$700~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2093.9216,-111.0341,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~g~Shotgun~w~/20 tiros por R$500~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2087.3335,-110.8945,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~w~Uma ~p~Granada ~w~por R$400~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2093.7100,-114.3213,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~y~MP5~w~/200 tiros por R$1000~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2420.7698,-335.2537,62.3079) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~w~Desert Eagle/100 tiros por R$450~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2420.7698,-337.5442,62.4609) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~b~AK47~w~/250 tiros por R$3000~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2420.7698,-339.9688,62.5826) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~r~Rifle Sniper~w~/30 tiros por R$800~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2423.5852,-333.3671,62.0140) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~y~Uzi~w~/200 tiros por R$800~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2426.2629,-338.9652,62.1623) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~g~Sawn-Off~w~/20 tiros por R$700~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2423.5376,-339.7253,62.3911) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~w~Um ~p~Molotov ~w~por R$500~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2090.3850,-111.6046,35.3203) && gTeam[i] == TEAM_BOPE) { GameTextForPlayer(i, "~w~Colete por R$700~n~Digite /comprar", 5000, 5); } else if (PlayerToPoint(2.0, i, -2558.1787,-448.5563,67.0477) && gTeam[i] == TEAM_FAVELA) { GameTextForPlayer(i, "~w~Maconha(Recupera sua energia quando voce ~r~/fumar~w~) por R$500~n~Digite /comprar", 8000, 5); } } if(strcmp(cmd, "/comprar", true) == 0) { new i = playerid; if (PlayerToPoint(2.0, i, -2093.4849,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 450) { GameTextForPlayer(i, "~w~Desert Eagle/100 tiros por R$450", 5000, 5); GivePlayerMoney(i, -450); GivePlayerWeapon(i,24,100); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$450", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2090.7937,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 3000) { GameTextForPlayer(i, "~b~M4~w~/250 tiros por R$3000", 5000, 5); GivePlayerMoney(i, -3000); GivePlayerWeapon(i,31,250); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$3000", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2087.0874,-106.4410,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 700) { GameTextForPlayer(i, "~r~Rifle~w~/30 tiros por R$700", 5000, 5); GivePlayerMoney(i, -700); GivePlayerWeapon(i,33,30); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$700", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2093.9216,-111.0341,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 500) { GameTextForPlayer(i, "~g~Shotgun~w~/20 tiros por R$500", 5000, 5); GivePlayerMoney(i, -500); GivePlayerWeapon(i,25,20); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$500", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2087.3335,-110.8945,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 400) { GameTextForPlayer(i, "~w~Uma ~p~Granada ~w~por R$400", 5000, 5); GivePlayerMoney(i, -400); GivePlayerWeapon(i,16,1); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$400", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2093.7100,-114.3213,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 1000) { GameTextForPlayer(i, "~y~MP5~w~/200 tiros por R$1000", 5000, 5); GivePlayerMoney(i, -1000); GivePlayerWeapon(i,29,200); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$1000", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2420.7698,-335.2537,62.3079) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 450) { GameTextForPlayer(i, "~w~Desert Eagle/100 tiros por R$450", 5000, 5); GivePlayerMoney(i, -450); GivePlayerWeapon(i,24,100); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$450", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2420.7698,-337.5442,62.4609) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 3000) { GameTextForPlayer(i, "~b~AK47~w~/250 tiros por R$3000", 5000, 5); GivePlayerMoney(i, -3000); GivePlayerWeapon(i,30,250); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$3000", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2420.7698,-339.9688,62.5826) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 800) { GameTextForPlayer(i, "~r~Rifle Sniper~w~/30 tiros por R$800", 5000, 5); GivePlayerMoney(i, -800); GivePlayerWeapon(i,34,30); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$800", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2423.5852,-333.3671,62.0140) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 800) { GameTextForPlayer(i, "~y~Uzi~w~/200 tiros por R$800", 5000, 5); GivePlayerMoney(i, -800); GivePlayerWeapon(i,28,200); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$800", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2426.2629,-338.9652,62.1623) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 700) { GameTextForPlayer(i, "~g~Sawn-Off~w~/20 tiros por R$700", 5000, 5); GivePlayerMoney(i, -700); GivePlayerWeapon(i,26,20); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$700", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2423.5376,-339.7253,62.3911) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 500) { GameTextForPlayer(i, "~w~Um ~p~Molotov ~w~por R$500", 5000, 5); GivePlayerMoney(i, -500); GivePlayerWeapon(i,18,1); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$500", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2090.3850,-111.6046,35.3203) && gTeam[i] == TEAM_BOPE) { if(GetPlayerMoney(i) >= 700) { GameTextForPlayer(i, "~w~Colete por R$700", 5000, 5); GivePlayerMoney(i, -700); SetPlayerArmour(i,100); } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$700", 5000, 5); } } else if (PlayerToPoint(2.0, i, -2558.1787,-448.5563,67.0477) && gTeam[i] == TEAM_FAVELA) { if(GetPlayerMoney(i) >= 500) { GameTextForPlayer(i, "~w~Maconha por R$500 digite /fumar para recuperar a energia.", 5000, 5); GivePlayerMoney(i, -500); gMaconha[i] += 1; } else { GameTextForPlayer(i, "~w~Voce nao tem dinheiro suficiente! ~n~~r~R$500", 5000, 5); } } return 1; } if(strcmp(cmd, "/dia", true) == 0) { if(IsPlayerAdmin(playerid)) { SetWorldTime(12); } return 1; } if(strcmp(cmd, "/fumar", true) == 0 && gTeam[playerid] == TEAM_FAVELA) { if(gMaconha[playerid] >= 1) { SetPlayerHealth(playerid, 100); gMaconha[playerid] -= 1; SendClientMessage(playerid, COLOR_WHITE, " Vocк fumou Maconha e recuperou sua energia."); } else return 1; } if(strcmp(cmd, "/noite", true) == 0) { if(IsPlayerAdmin(playerid)) { SetWorldTime(0); } return 1; } if(strcmp(cmd, "/ouvirtudo", true) == 0 && IsPlayerAdmin(playerid)) { if(IsPlayerConnected(playerid)) { if (BigEar[playerid] == 0) { BigEar[playerid] = 1; SendClientMessage(playerid, COLOR_WHITE, " Modo Ouvir Tudo Ativado"); } else if (BigEar[playerid] == 1) { BigEar[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, " Modo Ouvir Tudo Desativado"); } } return 1; } if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0) { if(IsPlayerConnected(playerid)) { if (Radio[playerid] == 0) { Radio[playerid] = 1; SendClientMessage(playerid, COLOR_WHITE, " Radio Ligado"); } else if (Radio[playerid] == 1) { Radio[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, " Radio Desligado"); } } return 1; } if(strcmp(cmd, "/gritar", true) == 0 || strcmp(cmd, "/g", true) == 0) { if(IsPlayerConnected(playerid)) { if (Gritar[playerid] == 0) { Gritar[playerid] = 1; Normal[playerid] = 0; Baixo[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, " Modo de Fala: Gritar"); } else { SendClientMessage(playerid, COLOR_WHITE, " Vocк jб esta no modo de fala Gritar"); } } return 1; } if(strcmp(cmd, "/baixo", true) == 0 || strcmp(cmd, "/b", true) == 0) { if(IsPlayerConnected(playerid)) { if (Baixo[playerid] == 0) { Gritar[playerid] = 0; Normal[playerid] = 0; Baixo[playerid] = 1; SendClientMessage(playerid, COLOR_WHITE, " Modo de Fala: Baixo"); } else { SendClientMessage(playerid, COLOR_WHITE, " Vocк jб esta no modo de fala Baixo"); } } return 1; } if(strcmp(cmd, "/normal", true) == 0 || strcmp(cmd, "/n", true) == 0) { if(IsPlayerConnected(playerid)) { if (Normal[playerid] == 0) { Gritar[playerid] = 0; Normal[playerid] = 1; Baixo[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, " Modo de Fala: Normal"); } else { SendClientMessage(playerid, COLOR_WHITE, " Vocк jб esta no modo de fala Normal"); } } return 1; } if(strcmp(cmd, "/objetivo", true) == 0) { if(gTeam[playerid] == TEAM_BOPE) { SendClientMessage(playerid, BOPE_COLOR,"**** Policia x Traficante ****"); SendClientMessage(playerid, BOPE_COLOR,"Seu objetivo й invadir a favela, se vocк chegar atй o final dela vocк e a Policia Vencem."); SendClientMessage(playerid, BOPE_COLOR,"Vocк pode comprar armas na sua base mas pra isso vocк vai precisar de dinheiro."); SendClientMessage(playerid, BOPE_COLOR,"Para ganhar dinheiro mate os Moradores da Favela, os Traficantes. Cada inimigo morto vocк ganha R$1000"); SendClientMessage(playerid, BOPE_COLOR,"Lembre-se nгo mate amigos se nгo vocк perde dinheiro e pontos."); return 1; } if(gTeam[playerid] == TEAM_FAVELA) { SendClientMessage(playerid, FAVELA_COLOR,"**** Os Traficantes ****"); SendClientMessage(playerid, FAVELA_COLOR,"Seu objetivo й proteger a favela dos Policiais."); SendClientMessage(playerid, FAVELA_COLOR,"Vocк pode comprar armas na favela mas pra isso vocк vai precisar de dinheiro."); SendClientMessage(playerid, FAVELA_COLOR,"Para ganhar dinheiro mate os Guerreiros da Policia. Cada inimigo morto vocк ganha R$1000"); SendClientMessage(playerid, FAVELA_COLOR,"Lembre-se nгo mate amigos se nгo vocк perde dinheiro e pontos."); return 1; } return 1; } if(strcmp(cmd, "/dardinheiro", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /dardinheiro [id do jogador] [dinheiro]"); return 1; } giveplayerid = strval(tmp); // giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USE: /dardinheiro [id do jogador] [dinheiro]"); return 1; } moneys = strval(tmp); if (IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(5.0, playerid, giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); GivePlayerMoney(giveplayerid, moneys); format(string, sizeof(string), " Vocк deu para %s(id:%d), R$%d.", giveplayer,giveplayerid, moneys); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), " Vocк recebeu R$%d de %s(id:%d).", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_WHITE, string); PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0); printf("$$$ %d(%s) deu R$%d para %s(%d) $$$",sendername, playerid, moneys, giveplayer, giveplayerid); format(string, sizeof(string), "* %s pegou dinheiro e deu para %s.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { SendClientMessage(playerid, COLOR_WHITE, " Quantidade Invбlida."); } } else { SendClientMessage(playerid, COLOR_WHITE, " Vocк esta muito longe."); } }//invalid id } else { format(string, sizeof(string), " %d nгo й um jogador ativo.", giveplayerid); SendClientMessage(playerid, COLOR_WHITE, string); } } return 1; } return 0; } public OnPlayerRequestClass(playerid, classid) { SetPlayerTeamFromClass(playerid, classid); PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0); SetupPlayerForClassSelection(playerid); gPlayerClass[playerid] = classid; switch (classid) { case 0, 1, 2, 3: { GameTextForPlayer(playerid, "~b~Policias", 1000, 3); SetPlayerInterior(playerid,8); SetPlayerFacingAngle(playerid,280.0); SetPlayerPos(playerid,2806.69,-1171.72,1025.07); SetPlayerCameraPos(playerid,2809.3428,-1170.4800,1025.5703); SetPlayerCameraLookAt(playerid,2805.69,-1171.72,1025.07); } case 4, 5, 6, 7, 8, 9, 10, 11, 12, 13: { GameTextForPlayer(playerid, "~r~Traficantes", 1000, 3); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0.0); SetPlayerPos(playerid,2345.73,-1185.91,1027.33); SetPlayerCameraPos(playerid,2345.8430,-1182.6597,1027.9766); SetPlayerCameraLookAt(playerid,2345.73,-1185.91,1028.33); } } return 1; } //--------------------------------------------------------- public OnPlayerSpawn(playerid) { SetPlayerToTeamColour(playerid); SetPlayerInterior(playerid,0); SetPlayerRandomSpawn(playerid); GivePlayerMoney(playerid,100); PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0); switch (gPlayerClass[playerid]) { case 0, 1, 2, 3: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_FAVELA1; SetPlayerMapIcon(playerid,1,-2090.7937,-106.4410,35.3203,6,0); RemovePlayerMapIcon(playerid,2); RemovePlayerMapIcon(playerid,3); SendClientMessage(playerid,BOPE_COLOR,"[2011] Policia x Traficante : Homens de preto qual й sua missгo...?"); SendClientMessage(playerid,BOPE_COLOR,"[2011] Policia x Traficante : Й entrar na favela e deixar corpo no chгo."); SetPlayerCheckpoint(playerid,-2781.5393,-491.8648,7.3748,5.0); SetPlayerInterior(playerid,0); GameTextForPlayer(playerid, "~b~Compre armas, pegue um veiculo e va ate a Favela", 12000, 5); } case 4, 5, 6, 7, 8, 9, 10, 11, 12, 13: { gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; DisablePlayerCheckpoint(playerid); SetPlayerMapIcon(playerid,2,-2420.7698,-337.5442,62.4609,18,0); SetPlayerMapIcon(playerid,3,-2558.1787,-448.5563,67.0477,23,0); RemovePlayerMapIcon(playerid,1); SendClientMessage(playerid,FAVELA_COLOR,"[2011] Policia x Traficante : Quem tu acha que garante a paz aqui? Sгo os PM?"); SendClientMessage(playerid,FAVELA_COLOR,"[2011] Policia x Traficante : Й o Comando, e o Comando й nуis!"); GameTextForPlayer(playerid, "~r~Compre armas e defenda a Favela!", 12000, 5); SetPlayerInterior(playerid,0); } } return 1; } public SetPlayerRandomSpawn(playerid) { if (gTeam[playerid] == TEAM_BOPE) { new rand = random(sizeof(gBope)); SetPlayerPos(playerid, gBope[rand][0], gBope[rand][1], gBope[rand][2]); // Warp the player } else if (gTeam[playerid] == TEAM_FAVELA) { new rand = random(sizeof(gFavela)); SetPlayerPos(playerid, gFavela[rand][0], gFavela[rand][1], gFavela[rand][2]); // Warp the player } return 1; } //--------------------------------------------------------- SetPlayerToTeamColour(playerid) { if(gTeam[playerid] == TEAM_BOPE) { SetPlayerColor(playerid,BOPE_COLOR); // AZUL } else if(gTeam[playerid] == TEAM_FAVELA) { SetPlayerColor(playerid,FAVELA_COLOR); // VERMELHO } } //--------------------------------------------------------- public OnPlayerEnterCheckpoint(playerid) { switch (gPlayerCheckpointStatus[playerid]) { case CHECKPOINT_FAVELA1: { GameTextForPlayer(playerid, "Agora invada a Favela", 5000, 5); SetPlayerCheckpoint(playerid,-2451.0122,-366.3279,69.6510, 5.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_FAVELA2; } case CHECKPOINT_FAVELA2: { SetPlayerCheckpoint(playerid,-2321.2080,-437.0745,79.7439, 5.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_FAVELA3; } case CHECKPOINT_FAVELA3: { SetPlayerCheckpoint(playerid,-2415.9526,-416.7277,85.5477, 5.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_FAVELA4; } case CHECKPOINT_FAVELA4: { SetPlayerCheckpoint(playerid,-2569.9846,-467.9969,69.9589, 5.0); gPlayerCheckpointStatus[playerid] = CHECKPOINT_FAVELA5; } case CHECKPOINT_FAVELA5: { DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; EndTheRound(BOPE_WIN); } default: { DisablePlayerCheckpoint(playerid); } } return 1; } //--------------------------------------------------------- public OnPlayerDeath(playerid, killerid, reason) { SendDeathMessage(killerid,playerid,reason); if(gTeam[playerid] == TEAM_BOPE) { //IF VICTIM IS a COP GameTextForPlayer(playerid, "~r~Morto!", 5000, 3); //SAY TO VICTIM -WASTED- GameTextForPlayer(killerid, "~r~Voce matou um! ~n~~g~R$4000", 5000, 3);//SAY TO KILLER -GOOD SHOT- gMaconha[playerid] = 0; GivePlayerMoney(killerid, 4000); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); } if(gTeam[playerid] == TEAM_FAVELA) {//IF VICTIM IS a ROBBER GameTextForPlayer(playerid, "~b~Morto!", 5000, 3);//SAY TO VICTIM -WASTED- GameTextForPlayer(killerid, "~b~Voce matou um! ~n~~g~R$4000", 5000, 3);//SAY TO KILLER -BUSTED- gMaconha[playerid] = 0; GivePlayerMoney(killerid, 4000); SetPlayerScore(killerid,GetPlayerScore(killerid)+1); } if(gTeam[playerid] == gTeam[killerid]){ //IF KILLER'S TEAM IS THE SAME OF VICTIM'S TEAM GameTextForPlayer(killerid, "~r~ Nao mate Amigos!", 5000, 3);//SAY TO DO NOT TEAMKILL. GivePlayerMoney(killerid, -1000); SetPlayerHealth(killerid, 0); SetPlayerScore(killerid,GetPlayerScore(killerid)-1); } } //--------------------------------------------------------- EndTheRound(winner) { switch (winner) { case BOPE_WIN: { GameTextForAll("~w~A ~b~Policiais ~w~invadiu a Favela.", 2000, 5); } case FAVELA_WIN: { GameTextForAll("~w~O ~r~Traficantes ~w~defendeu a Favela.", 2000, 5); } } SetTimer("GameModeExitFunc", 5000, 0); } //--------------------------------------------------------- public GameModeExitFunc() { GameModeExit(); } strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } public OnPlayerText(playerid, text[]) { new sendername[MAX_PLAYER_NAME]; new string[256]; if (Normal[playerid] == 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s disse: %s", sendername, text); ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } if (Radio[playerid] == 1 && Normal[playerid] == 1) { if(gTeam[playerid] == TEAM_FAVELA) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s disse(radio): %s", sendername, text); SendTeamMessage(TEAM_FAVELA, RADIO_COLOR, string); } if(gTeam[playerid] == TEAM_BOPE) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s disse(radio): %s", sendername, text); SendTeamMessage(TEAM_BOPE, RADIO_COLOR, string); } } if (Radio[playerid] == 1 && Baixo[playerid] == 1) { if(gTeam[playerid] == TEAM_FAVELA) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s falou baixo(radio): %s", sendername, text); SendTeamMessage(TEAM_FAVELA, RADIO_COLOR, string); } if(gTeam[playerid] == TEAM_BOPE) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s falou baixo(radio): %s", sendername, text); SendTeamMessage(TEAM_BOPE, RADIO_COLOR, string); } } if (Radio[playerid] == 1 && Gritar[playerid] == 1) { if(gTeam[playerid] == TEAM_FAVELA) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s gritou(radio): %s!!", sendername, text); SendTeamMessage(TEAM_FAVELA, RADIO_COLOR, string); } if(gTeam[playerid] == TEAM_BOPE) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s gritou(radio): %s!!", sendername, text); SendTeamMessage(TEAM_BOPE, RADIO_COLOR, string); } } if (Baixo[playerid] == 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s disse baixo: %s", sendername, text); ProxDetector(5.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } if (Gritar[playerid] == 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s grita: %s!!", sendername, text); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } return 0; } public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5) { if(IsPlayerConnected(playerid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(!BigEar[i]) { GetPlayerPos(i, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) { SendClientMessage(i, col1, string); } else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) { SendClientMessage(i, col2, string); } else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) { SendClientMessage(i, col3, string); } else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) { SendClientMessage(i, col4, string); } else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { SendClientMessage(i, col5, string); } } else { SendClientMessage(i, col1, string); } } } }//not connected return 1; } public SendTeamMessage(team, color, string[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(gTeam[i] == team) { SendClientMessage(i, color, string); } } } } public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } public ProxDetectorS(Float:radi, playerid, targetid) { if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid)) { new Float:posx, Float:posy, Float:posz; new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); //radi = 2.0; //Trigger Radius GetPlayerPos(targetid, posx, posy, posz); tempposx = (oldposx -posx); tempposy = (oldposy -posy); tempposz = (oldposz -posz); //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; } public OnPlayerStateChange(playerid, newstate, oldstate) { new carid; carid = GetPlayerVehicleID(playerid); if(newstate == 2 && carid < 12 && gTeam[playerid] == TEAM_FAVELA) { SendClientMessage(playerid, FAVELA_COLOR,"Vocк nгo pode dirigir os carros da Polнcia."); RemovePlayerFromVehicle(playerid); } if(newstate == 2 && carid > 11 && gTeam[playerid] == TEAM_BOPE) { SendClientMessage(playerid, BOPE_COLOR,"Vocк sу pode dirigir os carros da Polнcia."); RemovePlayerFromVehicle(playerid); } return 0; }
Grato *-*
Pra quem tirar os bugs, add ai : glu.sci@hotmail.com
eu do adm 10 no server *-*
Valeu ai!