// Races GM 0.1 // Coded by Chiarboss // ©2007 // Dont edit code or part of it without my permission // To get permission contact: marco.chiarelli@hotmail.it #include #pragma tabsize 0 #pragma amxram 0 #define SLOTS 28 enum SavePlayerPosEnum { Float:LastX, Float:LastY, Float:LastZ } new SavePlayerPos[SLOTS][SavePlayerPosEnum]; new speedo[MAX_PLAYERS]=1; new UpdateSeconds = 1; //colori #define COLOR_SYSTEM 0xEFEFF7AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_BLUE 0x1111AAFF #define COLOR_PINK 0xFF66FFAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_GREENYELLOW 0xADFF2FAA #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green #define TEAM_GROVE_COLOR 0x00D900C8 #define NICE_BLUE 0xa0d3ffAA #define ADMIN_ONLY false // Change this to true if you want /addcomp accessible to only administrators. #define Checkpoints_RACE 25 new Float:gCheckpointsRACE[Checkpoints_RACE][6] = { {-66.7512,-1610.1893,2.8125,-217.3855,-1647.2559,2.2187}, {-217.3855,-1647.2559,2.2187,-279.5372,-1871.2906,24.1228}, {-279.5372,-1871.2906,24.1228,-261.0673,-2077.8005,37.0085}, {-261.0673,-2077.8005,37.0085,-401.0511,-2195.7173,53.6497}, {-401.0511,-2195.7173,53.6497,-526.3018,-2164.8188,50.5341}, {-526.3018,-2164.8188,50.5341,-661.8704,-2216.6887,10.0026}, {-661.8704,-2216.6887,10.0026,-788.7496,-2469.6450,76.6163}, {-788.7496,-2469.6450,76.6163,-952.7852,-2601.9768,88.6082}, {-952.7852,-2601.9768,88.6082,-1171.9209,-2513.8457,64.6507}, {-1171.9209,-2513.8457,64.6507,-1149.3759,-2290.8206,36.7843}, {-1149.3759,-2290.8206,36.7843,-1082.1783,-2109.6626,42.2222}, {-1082.1783,-2109.6626,42.2222,-947.7084,-1905.8394,81.2176}, {-947.7084,-1905.8394,81.2176,-846.4545,-1845.7675,90.7151}, {-846.4545,-1845.7675,90.7151,-758.9094,-1637.4032,96.3629}, {-758.9094,-1637.4032,96.3629,-741.5738,-1269.9360,67.9881}, {-741.5738,-1269.9360,67.9881,-706.9772,-1718.5565,44.8545}, {-706.9772,-1718.5565,44.8545,-633.8704,-1267.7871,19.9652}, {-633.8704,-1267.7871,19.9652,-481.7682,-992.3772,24.7383}, {-481.7682,-992.3772,24.7383,-404.0322,-873.7599,26.2159}, {-404.0322,-873.7599,26.2159,-304.1373,-795.5358,34.3539}, {-304.1373,-795.5358,34.3539,-273.4507,-883.4163,45.2272}, {-273.4507,-883.4163,45.2272,-109.0072,-1007.3318,23.9521}, {-109.0072,-1007.3318,23.9521,-137.0697,-1442.3735,2.4224}, {-137.0697,-1442.3735,2.4224,-24.5592,-1527.8329,1.5907}, {-24.5592,-1527.8329,1.5907,-66.7512,-1610.1893,2.8125} }; #define Checkpoints_DRIFT 21 new Float:gCheckpointsDRIFT[Checkpoints_DRIFT][6] = { {2301.5854,1511.3855,16.7802,2333.1799,1483.9044,18.0411}, {2333.1799,1483.9044,18.0411,2308.3223,1397.9198,23.1985}, {2308.3223,1397.9198,23.1985,2277.1584,1441.7946,25.6582}, {2277.1584,1441.7946,25.6582,2304.8025,1510.3226,29.5608}, {2304.8025,1510.3226,29.5608,2336.4619,1469.4501,31.7436}, {2336.4619,1469.4501,31.7436,2309.7029,1398.8805,35.9859}, {2309.7029,1398.8805,35.9859,2277.0657,1430.9948,37.7606}, {2277.0657,1430.9948,37.7606,2312.8684,1498.4193,42.3856}, {2312.8684,1498.4193,42.3856,2324.8567,1398.6986,42.3856}, {2324.8567,1398.6986,42.3856,2287.9839,1487.8280,41.3711}, {2287.9839,1487.8280,41.3711,2307.7163,1397.4240,35.9833}, {2307.7163,1397.4240,35.9833,2338.8184,1444.9437,33.2799}, {2338.8184,1444.9437,33.2799,2306.5796,1510.7819,29.5870}, {2306.5796,1510.7819,29.5870,2276.1404,1453.2281,26.3975}, {2276.1404,1453.2281,26.3975,2307.6206,1394.7222,23.1967}, {2307.6206,1394.7222,23.1967,2342.3420,1453.8223,19.9576}, {2342.3420,1453.8223,19.9576,2306.1086,1509.3232,16.7894}, {2306.1086,1509.3232,16.7894,2276.3494,1461.9374,14.1589}, {2276.3494,1461.9374,14.1589,2311.0728,1417.5859,10.3885}, {2311.0728,1417.5859,10.3885,2309.9028,1523.5404,10.3067}, {2309.9028,1523.5404,10.3067,2301.5854,1511.3855,16.7802} }; #define Checkpoints_SPRINT 25 new Float:gCheckpointsSPRINT[Checkpoints_SPRINT][6] = { {2381.0564,-1731.7682,12.9482,2216.2087,-1786.7402,12.8095}, {2216.2087,-1786.7402,12.8095,2245.3611,-2042.0237,12.9731}, {2245.3611,-2042.0237,12.9731,2264.9197,-2099.2998,13.2945}, {2264.9197,-2099.2998,13.2945,2116.5073,-2199.3054,12.9411}, {2116.5073,-2199.3054,12.9411,1639.8275,-2160.3850,22.2970}, {1639.8275,-2160.3850,22.2970,1505.7074,-1873.6610,12.9560}, {1505.7074,-1873.6610,12.9560,1048.5708,-1827.5640,13.2782}, {1048.5708,-1827.5640,13.2782,917.5392,-1742.6875,12.9572}, {917.5392,-1742.6875,12.9572,1035.6566,-1770.4460,12.9539}, {1035.6566,-1770.4460,12.9539,1040.2621,-1547.7175,12.9279}, {1040.2621,-1547.7175,12.9279,1097.0983,-1400.4071,13.0146}, {1097.0983,-1400.4071,13.0146,1195.7357,-1445.8368,12.9304}, {1195.7357,-1445.8368,12.9304,1232.7902,-1571.4283,12.9476}, {1232.7902,-1571.4283,12.9476,1331.6617,-1573.8010,12.9294}, {1331.6617,-1573.8010,12.9294,1302.0541,-1532.3878,12.9382}, {1302.0541,-1532.3878,12.9382,1331.6393,-1573.6129,12.9197}, {1331.6393,-1573.6129,12.9197,1457.0300,-1434.0289,12.9561}, {1457.0300,-1434.0289,12.9561,1480.5970,-1138.4832,23.4770}, {1480.5970,-1138.4832,23.4770,1412.8500,-1035.3120,23.2225}, {1412.8500,-1035.3120,23.2225,1372.0653,-994.0861,28.4911}, {1372.0653,-994.0861,28.4911,1428.2690,-948.9029,35.7081}, {1428.2690,-948.9029,35.7081,1894.4945,-1019.6456,35.6988}, {1894.4945,-1019.6456,35.6988,2095.0281,-1059.0872,27.6162}, {2095.0281,-1059.0872,27.6162,2219.7197,-1140.3845,25.3282}, {2219.7197,-1140.3845,25.3282,2219.7197,-1140.3845,25.3282} }; new playerColors[100] = { 0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF, 0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF, 0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF, 0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF, 0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF, 0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF, 0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF, 0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF, 0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF, 0x3FE65CFF }; new Float:xdeath,Float:ydeath,Float:zdeath,Float:zangledeath; new freezed[MAX_PLAYERS]=0,mute[MAX_PLAYERS],freezedall=0,mutedall=0; new MAX_CHECKPOINTS,spawnlock=1,Text:Speedometer[MAX_PLAYERS],gTime=0,lockex[MAX_PLAYERS]=0,support[MAX_PLAYERS],count[MAX_PLAYERS]=0,status=0,modality=0,check[MAX_PLAYERS],race=0,rname[256],death[MAX_PLAYERS]=1,inconfirm=0,indeath=1,inspeedo=1,lock=1,heal=1,extra=0,countdown,cdtimer; new systemvrc=0,adverts=0,forall=1,systemrc=1,clockex=1,bonusclock[MAX_PLAYERS]=1,dist=1,advex=1,pidplayer; new betting=1,rcon[MAX_PLAYERS]=0,stringex[256],soctimer=0,MAXSTATUS=2,socdelay=60000,soc=1,extimer=0,pidbet[MAX_PLAYERS],kills[MAX_PLAYERS]=0,inshop[MAX_PLAYERS],shoplock=0,bounty[MAX_PLAYERS],betted[MAX_PLAYERS]=0,highdive=0,timeview=1; new ooclock=0; new Pvotes = 0; new Nvotes = 0; new VoteStatus = 0; new Voted[MAX_PLAYERS] = 0; new vtimer; forward UpdateSpeed(); forward BackRace(); forward RaceTimer(); forward ForCountdown(); forward Countdown(); forward MCountdown(); forward votetimer(); forward Adverts(); forward Soc(); forward GameModeExitFunc(); #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" This is a GM, not a FS. SSSError(404)"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } #else main() { print("\n----------------------------------"); print(" Races GM 0.1"); print("----------------------------------\n"); } #endif public OnGameModeInit() { // Don't use these lines if it's a filterscript SetTimer("UpdateSpeed", UpdateSeconds*1000, 1); SetTimer("RaceTimer",1000,1); SetGameModeText("Races GM 0.1"); AddPlayerClass(286,0.0,0.0,0.0,0.0,0,0,0,0,0,0); // spawnplayersrace AddStaticVehicle(411,-28.2927,-1525.5226,1.5672,176.2176,64,1); // infernusrace1 AddStaticVehicle(411,-20.6456,-1526.0940,1.5724,175.9430,64,1); // infernus2race1 AddStaticVehicle(562,2280.7559,1402.8698,10.5242,1.1719,35,1); // elegydrift1 AddStaticVehicle(562,2273.6790,1402.3224,10.4953,1.4590,17,1); // elegydrift2 AddStaticVehicle(494,2636.2161,-1736.0754,10.6233,88.2535,42,30); // spawnhotringsprint1 AddStaticVehicle(494,2636.4199,-1729.0693,10.6232,88.7305,42,33); // spawnhotringsprint2 SetupForRace(); return 1; } public OnVehicleSpawn(vehicleid) { AddVehicleComponent(vehicleid,1008); return 1; } public OnPlayerDisconnect(playerid,reason) { new string[256],name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(reason == 0 && race == 1 && soc==1) { format(string,sizeof(string),"~r~%s ~r~è crashato! ~w~Siete tutti ~y~freezati!",name); GameTextForAll(string,5000,6); if(extimer == 0) { soctimer=SetTimer("Soc",60000,0);}else{soctimer=SetTimer("Soc",socdelay*60000,0);} for(new i=0;i 1){ value = floatround(value / UpdateSeconds); } switch(speedo[i]){ case 1:format(string, sizeof(string),"~b~MpH: ~g~%d",floatround(value/1600)); case 2:format(string, sizeof(string),"~b~KM/H: ~g~%d",floatround(value/1000)); case 3:format(string, sizeof(string), "~b~KpH: ~g~%d",floatround(value/1400)); } if(speedo[i] != 0){ TextDrawDestroy(Speedometer[i]); Speedometer[i] = TextDrawCreate(90.0, 320.0, string); TextDrawTextSize(Speedometer[i], 60, 100); TextDrawUseBox(Speedometer[i], 1); TextDrawBoxColor(Speedometer[i], 0x000000FF); TextDrawSetOutline(Speedometer[i], 0); TextDrawFont(Speedometer[i], 3); TextDrawSetProportional(Speedometer[i], 1); TextDrawAlignment(Speedometer[i], 2); TextDrawShowForPlayer(i, Speedometer[i]); } SavePlayerPos[i][LastX] = x; SavePlayerPos[i][LastY] = y; SavePlayerPos[i][LastZ] = z; } } } public OnPlayerConnect(playerid) { new name[MAX_PLAYER_NAME],string[256]; GetPlayerName(playerid,name,sizeof(name)); SendClientMessage(playerid,0xFF8A00AA,"Welcome to Races GM 0.1 [coded by Chiarboss]"); SendClientMessage(playerid, 0xFFFF00AA, "Type /about if you don't now how this mode work"); SendClientMessage(playerid, 0xFFFFFFAA, "Type /cmdlist for see the server commands..."); GameTextForPlayer(playerid, "~g~- ~r~SA-MP ~y~World ~g~-", 6000, 1); GivePlayerMoney(playerid, 10000); SetPlayerColor(playerid, COLOR_GREY); // Set the player's color to inactive format(string,sizeof(string),"~r~%s ~r~è rientrato! ~w~Siete tutti ~y~sfreezati!",name); if(race==1&&soc==1){KillTimer(soctimer);GameTextForAll(string,5000,6);for(new i=0;i Type /lock to lock, unlock the doors. <>"); return 1; } public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger) { printf("OnPlayerEnterVehicle(%d, %d, %d)", playerid, vehicleid, ispassenger); return 1; } public OnPlayerExitVehicle(playerid,vehicleid) { printf("OnPlayerExitVehicle(%d, %d)", playerid, vehicleid); if(race == 1) { if(IsPlayerAdmin(playerid) && rcon[playerid] == 1){ SetPlayerHealth(playerid,0); TextDrawHideForPlayer(playerid, Speedometer[playerid]);}} return 1; } public OnPlayerText(playerid,text[]){ if(mute[playerid] == 1){ SendClientMessage(playerid,COLOR_RED,"Non puoi parlare, sei stato mutato da un admin."); return 0; } return 1; } public OnPlayerEnterCheckpoint(playerid) { if(IsPlayerInAnyVehicle(playerid)) { if(inconfirm == 1) { TogglePlayerControllable(playerid,0); GameTextForPlayer(playerid,"~n~~r~Attendi ~w~che finisca il ~r~timer di conferma.",5000,3); }else{ GameTextForPlayer(playerid,"~n~~r~Attendi ~w~che un arbitro ~r~avvii la gara.",5000,3);} }else{GameTextForPlayer(playerid,"~n~~r~Prendi ~w~un ~y~veicolo!",5000,3);} return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { new string[256]; switch(modality){ case 2:format(string,sizeof(string),"%d/3x21",check[playerid]); case 1,3:format(string,sizeof(string),"%d/%d",check[playerid],MAX_CHECKPOINTS); } if(race == 1){check[playerid]++;SetCheckpoint(playerid,check[playerid]);} if(check[playerid] == MAX_CHECKPOINTS-1){ support[playerid] = 1;}else{support[playerid]=0;GameTextForPlayer(playerid,string,2000,1);} if(check[playerid] == MAX_CHECKPOINTS-1 && modality != 2) { SetupForWinners(playerid); }else if(check[playerid] != MAX_CHECKPOINTS-1){PlayerPlaySound(playerid,1139,0,0,0);} else if(modality == 2) { if(check[playerid] == MAX_CHECKPOINTS-1){count[playerid]++;} if(count[playerid] == 4){SetupForWinners(playerid);} } return 1; } stock SetupForWinners(playerid) { new Float:fMinutes; new Minutes; new Seconds; new name[MAX_PLAYER_NAME],sentence[256]; GetPlayerName(playerid, name, 256); PlayerPlaySound(playerid,1137,0,0,0); status++; if(status == 1) { for(new i=0; i "); return 1; } txtid = strval(tmp); if(txtid == 2) { SendClientMessage(playerid, COLOR_RED, "Non puoi selezionare il 2° txtid."); return 1; } new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_RED, "Usage: /cnnn [cnnc textformat ~n~=Newline ~r~=Red ~g~=Green ~b~=Blue ~w~=White ~y~=Yellow]"); return 1; } format(string, sizeof(string), "~w~%s",result); for(new i = 0; i <= MAX_PLAYERS; i++) { if(IsPlayerConnected(i) == 1) { GameTextForPlayer(i, string, 5000, txtid); } } } else { SendClientMessage(playerid, COLOR_RED, "Devi essere un admin"); } return 1;} if(strcmp(cmd,"/bet",true)==0) { new tmp[256],name[MAX_PLAYER_NAME],playername[MAX_PLAYER_NAME]; tmp = strtok(cmdtext,idx); if(betting != 1) { SendClientMessage(playerid,COLOR_RED,"Il Match Point è chiuso."); return 1; } if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_RED,"Usage: /bet [playerid]"); return 1; } pidbet[playerid] = strval(tmp); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { if(betted[playerid] == 1) { SendClientMessage(playerid,0xFF8A00AA,"Hai disattivato la scommessa sul player scelto."); betted[playerid] = 0; }else{ SendClientMessage(playerid,COLOR_RED,"Usage: /bet [playerid] [delay]"); } return 1; } bounty[playerid] = strval(tmp); if(betted[playerid] == 1) { SendClientMessage(playerid,COLOR_RED,"Hai già scommesso. Per disattivare la scommessa premi /bet [playerid]"); return 1; } if(pidbet[playerid] == playerid) { SendClientMessage(playerid,COLOR_RED,"Non puoi scommettere su te stesso."); return 1; } if(bounty[playerid] == 0) { SendClientMessage(playerid,COLOR_RED,"Non puoi scommettere per 0$, n00b."); return 1; } if(bounty[playerid] <= GetPlayerMoney(playerid)) { if(IsPlayerConnected(pidbet[playerid])) { GetPlayerName(playerid,name,sizeof(name)); GetPlayerName(pidbet[playerid],playername,sizeof(playername)); format(string,sizeof(string),"%s ha scommesso su %s per %d$",name,playername,bounty[playerid]); SendClientMessageToAll(0xFF8A00AA,string); betted[playerid] = 1; }else{SendClientMessage(playerid,COLOR_RED,"Questo giocatore non e' connesso");} }else{SendClientMessage(playerid,COLOR_RED, "Non hai abbastanza soldi, vinci più race e ritorna!");} return 1; } if(strcmp(cmd,"/clocklock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(clockex == 1) { format(string,sizeof(string),"L'Admin %s ha disattivato il sistema Clock.",name); for(new i=0; i 0 && pidplayer < 4) { if (VoteStatus == 0) { GivePlayerMoney(playerid, -5); format(string, sizeof(string), "%s has started a RaceChangeVote! (%d)", name, pidplayer); SendClientMessageToAll(COLOR_SYSTEM,string); SendClientMessageToAll(COLOR_SYSTEM, "Poll Duration = 60 sec./1 minute"); SendClientMessageToAll(COLOR_SYSTEM, "Type /Yes to vote Yes or /No to vote No."); VoteStatus = 1; vtimer = SetTimer("votetimer",60000,0); } else if (VoteStatus == 1) { SendClientMessage(playerid, COLOR_SYSTEM, "Un altro sondaggio è già in corso!"); } } else { SendClientMessage(playerid,COLOR_RED,"Race ID invalido!"); ResetAdvise(playerid); } } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if (strcmp(cmd, "/votes", true)==0) { if(systemvrc == 1) { format(string, sizeof(string), "Race sondata: %d | Voti positivi: %d | Voti negativi: %d | Totale: %d",pidplayer, Pvotes, Nvotes, Pvotes + Nvotes); SendClientMessage(playerid, COLOR_SYSTEM, string); } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if (strcmp(cmd, "/killvote", true)==0) { if(systemvrc == 1) { if (IsPlayerAdmin(playerid) == 1 && VoteStatus == 1) { KillTimer(vtimer); ResetVoteStats(); SendClientMessageToAll(COLOR_SYSTEM, "Qualche admin ha cancellato il sondaggio!"); } else if (VoteStatus == 0) { SendClientMessage(playerid, COLOR_SYSTEM, "Non ci sono sondaggi attivi!"); } else if (IsPlayerAdmin(playerid) == 0) { SendClientMessage(playerid,COLOR_SYSTEM, "Devi essere un admin"); } } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if (strcmp(cmd, "/votehelp", true)==0) { if(systemvrc == 1) { SendClientMessage(playerid, COLOR_YELLOW, "This poll system will allow you to change the gamemode SR."); SendClientMessage(playerid, COLOR_YELLOW, "Type /startvote to begin the poll."); SendClientMessage(playerid, COLOR_YELLOW, "Type /Yes to vote Yes."); SendClientMessage(playerid, COLOR_YELLOW, "Type /No to vote No."); SendClientMessage(playerid, COLOR_YELLOW, "Type /votes to see the current total number of votes casted."); SendClientMessage(playerid, COLOR_YELLOW, "Type /killvote to disable any current polls (Admins only)."); } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if (strcmp(cmd, "/Yes", true)==0) { if(systemvrc == 1) { if (VoteStatus == 1 && Voted[playerid] == 0) { Pvotes++; SendClientMessage(playerid, COLOR_SYSTEM, "Il tuo voto è stato correttamente aggiunto."); Voted[playerid] = 1; } else if (Voted[playerid] == 1) { SendClientMessage(playerid, COLOR_SYSTEM, "Hai già votato per questo sondaggio!"); } else if (VoteStatus == 0) { SendClientMessage(playerid, COLOR_SYSTEM, "Non ci sono sondaggi attivi!"); } } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if (strcmp(cmd, "/No", true)==0) { if(systemvrc == 1) { if (VoteStatus == 1 && Voted[playerid] == 0) { Nvotes++; SendClientMessage(playerid, COLOR_SYSTEM, "Il tuo voto è stato correttamente aggiunto."); Voted[playerid] = 1; } else if (Voted[playerid] == 1) { SendClientMessage(playerid, COLOR_SYSTEM, "Hai già votato per questo sondaggio!"); } else if (VoteStatus == 0) { SendClientMessage(playerid, COLOR_SYSTEM, "Non ci sono sondaggi attivi!"); } } else { SendClientMessage(playerid,COLOR_RED,"Il sistema VCRS è attualmente disattivato."); } return 1; } if(strcmp(cmd,"/kill",true)==0) { if(race == 0) { SetPlayerHealth(playerid,0); }else{SendClientMessage(playerid,COLOR_RED,"Non è consentito killarsi durante la race!");} return 1; } if(strcmp(cmd,"/extra",true) == 0) { if(extra == 1) { new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name, sizeof(name)); if (IsPlayerInAnyVehicle(playerid) == 1) { SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,100); SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0); format(string,sizeof(string),"%s ha riparato l'auto ed è armato e pericoloso!.", name); GivePlayerWeapon(playerid,22,250); GivePlayerWeapon(playerid,31,400); GivePlayerWeapon(playerid,28,999); GivePlayerWeapon(playerid,26,999); GivePlayerWeapon(playerid,33,999); GivePlayerWeapon(playerid,41,99999); SendClientMessageToAll(0xFF8A00AA,string); } else { SetPlayerHealth(playerid,100); SetPlayerArmour(playerid,100); format(string,sizeof(string),"%s si è curato,ora è armato e pericoloso!.", name); GivePlayerWeapon(playerid,22,250); GivePlayerWeapon(playerid,31,400); GivePlayerWeapon(playerid,28,999); GivePlayerWeapon(playerid,26,999); GivePlayerWeapon(playerid,33,999); GivePlayerWeapon(playerid,41,99999); SendClientMessageToAll(0xFF8A00AA,string); } }else{SendClientMessage(playerid,COLOR_RED,"Il comando Extra è attualmente disattivato.");} return 1; } if(strcmp(cmdtext,"/kamikaze",true) == 0) { new Float:x; new Float:y; new Float:z; GetPlayerPos(playerid,x,y,z); CreateExplosion(x,y,z,100,9999); CreateExplosion(x+2,y+2,z+2,10,100); CreateExplosion(x+4,y+4,z+4,10,100); CreateExplosion(x+6,y+6,z+6,10,100); CreateExplosion(x+8,y+8,z+8,10,100); CreateExplosion(x+10,y+10,z+10,10,100); CreateExplosion(x+12,y+12,z,10,100); CreateExplosion(x+14,y+14,z,10,100); CreateExplosion(x+16,y+16,z,10,100); CreateExplosion(x+18,y+18,z,10,100); CreateExplosion(x+20,y+20,z,10,100); CreateExplosion(x-2,y-2,z,10,100); CreateExplosion(x-4,y-4,z,10,100); CreateExplosion(x-6,y-6,z,10,100); CreateExplosion(x-8,y-8,z,10,100); CreateExplosion(x-10,y-10,z,10,100); CreateExplosion(x-12,y-12,z,10,100); CreateExplosion(x-14,y-14,z,10,100); CreateExplosion(x-16,y-16,z,10,100); CreateExplosion(x-18,y-18,z,10,100); CreateExplosion(x-20,y-10,z,10,100); return 1; } if(strcmp(cmd,"/gethere",true) == 0) { if(IsPlayerAdmin(playerid) == 1) { new playername[MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; new tmp[256]; new pid; new Float:plx; new Float:ply; new Float:plz; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFF8A00AA,"Utilizzo: /gethere [playerid]"); return 1; } pid = strval(tmp); if(!IsPlayerConnected(pid)) { SendClientMessage(playerid,0xFF8A00AA,"Questo giocatore non e' connesso"); return 1; } GetPlayerName(pid,playername,sizeof(playername)); GetPlayerName(playerid,name, sizeof(name)); GetPlayerPos(playerid, plx, ply, plz); if (IsPlayerInAnyVehicle(pid) == 0) { SetPlayerPos(pid, plx, ply, plz); } else { SetVehiclePos(GetPlayerVehicleID(pid),plx,ply,plz); } format(string,sizeof(string),"%s ha teletrasportato a se %s .",name,playername); SendClientMessageToAll(0xFF8A00AA,string); } else { SendClientMessage(playerid,0xFF8A00AA,"Devi essere un admin"); } return 1; } if(strcmp(cmd,"/goto",true) == 0) { if(IsPlayerAdmin(playerid) == 1) { new playername[MAX_PLAYER_NAME]; new name[MAX_PLAYER_NAME]; new tmp[256]; new pid; new Float:pix; new Float:piy; new Float:piz; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFF8A00AA,"Utilizzo: /goto [playerid]"); return 1; } pid = strval(tmp); if(!IsPlayerConnected(pid)) { SendClientMessage(playerid,0xFF8A00AA,"Questo giocatore non e' connesso"); return 1; } GetPlayerName(pid,playername,sizeof(playername)); GetPlayerName(playerid,name, sizeof(name)); GetPlayerPos(pid, pix, piy, piz); if (IsPlayerInAnyVehicle(playerid) == 0) { SetPlayerPos(playerid, pix, piy, piz); } else { SetVehiclePos(GetPlayerVehicleID(playerid),pix,piy,piz); } format(string,sizeof(string),"%s si e' teletrasportato da %s .",name,playername); SendClientMessageToAll(0xFF8A00AA,string); } else { SendClientMessage(playerid,0xFF8A00AA,"Devi essere un admin"); } return 1; } if(strcmp(cmd,"/freeze",true) == 0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME],tmp[256],pid,playername[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { if(freezedall == 0){format(string,sizeof(string),"L'Admin %s ha freezato tutti i players connessi.",name);freezedall=1;for(new i=0;i 200 || pid < 2) { SendClientMessage(playerid,COLOR_RED,"Invalid Status!"); return 1; } MAXSTATUS=pid; format(string,sizeof(string),"L'Admin %s ha impostato come Max Status: (%d)",name,MAXSTATUS); SendClientMessageToAll(0xFF8A00AA,string); } else { SendClientMessage(playerid,COLOR_RED,"Devi essere un admin"); } return 1; } if(strcmp(cmd,"/shop",true)==0) { #if ADMIN_ONLY == true if(IsPlayerAdmin(playerid)) { #endif if(shoplock == 0) { if(race == 1){ new pid,tmp[256]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { if(GetPlayerMoney(playerid) >= 1000) { GivePlayerMoney(playerid,-1000); SendClientMessage(playerid,0xFF8A00AA,"Sei entrato correttamente nello shop."); inshop[playerid]=1; }else{SendClientMessage(playerid,COLOR_RED, "Non hai abbastanza soldi, vinci più race e ritorna!");} return 1; } pid = strval(tmp); if(inshop[playerid]==1) { if(pid > 1000 || pid < 1193) { if(IsPlayerInAnyVehicle(playerid)) { AddVehicleComponent(GetPlayerVehicleID(playerid),pid); format(string,sizeof(string),"Hai installato il componente: %d",pid); SendClientMessage(playerid,0xFF8A00AA,string); inshop[playerid]=0; }else{GameTextForPlayer(playerid,"~n~~r~Prendi ~w~un ~y~veicolo!",5000,3);} }else{SendClientMessage(playerid,COLOR_RED,"Invalid Component ID!"); SendClientMessage(playerid,COLOR_RED,"http://forum.sa-mp.com/index.php?topic=19995.0"); }}else{SendClientMessage(playerid,COLOR_RED,"Devi entrare nello shop!");} }else{SendClientMessage(playerid,COLOR_RED,"La gara dev'essere iniziata per poter utilizzare questo cmd.");} }else{SendClientMessage(playerid,COLOR_RED,"Il cmd shop è attualmente disattivato.");} #if ADMIN_ONLY == true }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} #endif return 1; } if(strcmp(cmd,"/shoplock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(shoplock == 0){ shoplock=1;format(string,sizeof(string),"L'Admin %s ha disattivato il cmd shop.",name);}else{ shoplock=0;format(string,sizeof(string),"L'Admin %s ha attivato il cmd shop.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmd,"/locksystem",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(lock == 1) { lock=0;format(string,sizeof(string),"L'Admin %s ha disattivato il sistema Lock.",name);}else{ lock=1;format(string,sizeof(string),"L'Admin %s ha attivato il sistema Lock.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmd,"/indeathlock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(indeath == 1) { indeath=0;format(string,sizeof(string),"L'Admin %s ha disattivato il sistema Indeath.",name);}else{ indeath=1;format(string,sizeof(string),"L'Admin %s ha attivato il sistema Indeath.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmd,"/indeath",true)==0) { if(race == 1) { if(indeath==1){ if(death[playerid]==1) { death[playerid]=0; SendClientMessage(playerid,0xFF8A00AA,"Hai disattivato il respawn nel punto di death."); }else{ death[playerid]=1; SendClientMessage(playerid,0xFF8A00AA,"Hai attivato il respawn nel punto di death."); } }else{SendClientMessage(playerid,COLOR_RED,"Il sistema indeath è stato disattivato.");} }else{SendClientMessage(playerid,COLOR_RED,"Questo cmd è utilizzabile solo durante la gara.");} return 1; } if (strcmp(cmd, "/lock", true)==0) { if(lock == 1) { if(IsPlayerInAnyVehicle(playerid)) { new State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOR_YELLOW,"Non sei un driver."); return 1; } new i; for(i=0;i 3){ SendClientMessage(playerid,COLOR_RED,"Invalid Speedometer ID!"); ResetForAdvise(playerid); }else{ speedo[playerid]=pid; if(pid==0){ SendClientMessage(playerid,COLOR_RED,"Hai disattivato lo speedometer."); return 1; } format(string,sizeof(string),"Hai scelto lo speedometer %d",pid); SendClientMessage(playerid,0xFF8A00AA,string); } }else{SendClientMessage(playerid,COLOR_RED,"La gara dev'essere iniziata per poter utilizzare questo cmd.");} return 1; } if(strcmp(cmd,"/extralock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(extra == 1) { heal=0;format(string,sizeof(string),"L'Admin %s ha disattivato il sistema Heal.",name);}else{ heal=1;format(string,sizeof(string),"L'Amdin %s ha attivato il sistema Heal.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmdtext,"/highdive",true)==0){ if(highdive==1){ new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,Float:X,Float:Y,Float:Z); SetPlayerPos(playerid,Float:X,Float:Y,Float:Z+9000); SendClientMessage(playerid, COLOR_GREEN, "Have fun diving! You will land in approx. 3 minutes!"); GameTextForPlayer(playerid,"WOOHOO!!!",9000,3); print("/highdive command used!"); GivePlayerWeapon(playerid, 46, 1 ); }else{SendClientMessage(playerid,COLOR_RED,"Il comando /highdive è attualmente disattivato.");} return 1; } if(strcmp(cmd,"/soc",true)==0) { if(IsPlayerAdmin(playerid)==1) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(soc == 0) { format(string,sizeof(string),"L'admin %s ha attivato il sistema di Stop-on-Crash.",name); soc = 1; } else { format(string,sizeof(string),"L'admin %s ha disattivato il sistema di Stop-on-Crash.",name); soc = 0; } SendClientMessageToAll(NICE_BLUE,string); } else { SendClientMessage(playerid,COLOR_RED,"Devi essere un admin"); } return 1; } if(strcmp(cmd,"/soctimer",true)==0) { if(IsPlayerAdmin(playerid)==1) { new name[MAX_PLAYER_NAME]; new tmp[256]; GetPlayerName(playerid,name,sizeof(name)); tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,0xFF8A00AA,"Hai settato il timer di default."); extimer = 0; return 1; } socdelay = strval(tmp); extimer=1; format(string,sizeof(string),"L'admin %s ha settato il timer della ripresa del gioco a %d minuti",name,socdelay); SendClientMessageToAll(NICE_BLUE,string); } else { SendClientMessage(playerid,COLOR_RED,"Devi essere un admin"); } return 1; } if(strcmp(cmd,"/highdivelock",true)==0) { if(IsPlayerAdmin(playerid)){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(highdive == 1) { highdive=0; format(string,sizeof(string),"L'Admin %s ha disabilitato il cmd highdive.",name); }else{timeview=1; format(string,sizeof(string),"The Admin %s ha abilitato il cmd highdive.",name);} }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1;} if(strcmp(cmdtext, "/me", true, 3)==0) { // 3 is the length of /me new name[256]; GetPlayerName(playerid, name, 256); format(string, 256, "%s %s", name, cmdtext[4]); SendClientMessageToAll(COLOR_LIGHTBLUE, string); return 1; } if (strcmp(cmd, "/time", true) == 0) { if(timeview == 1) { new hour,minute,second,day,month,year; gettime(hour,minute,second); getdate(day,month,year); format(string, sizeof(string), "~g~|~w~%d:%d~g~|~n~~w~%d~g~/~w~%d~g~/~w~%d", hour, minute,day,month,year); GameTextForPlayer(playerid, string, 5000, 1); }else{SendClientMessage(playerid,COLOR_RED,"Il tuo orologio è rotto.");} return 1; } if(strcmp(cmd,"/timelock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(timeview == 1) { timeview=0; format(string,sizeof(string),"L'Admin %s ha rotto a tutti gli orologi.",name); }else{timeview=1; format(string,sizeof(string),"The Admin %s ha riparato a tutti gli orologi.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0) { if(advex == 1) { if(adverts == 0) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_RED, "Usage: (/ad)vertise [advert text]"); return 1; } format(string, sizeof(string), "Advertisement: %s, Contact: %s", result, name); SendClientMessageToAll(TEAM_GROVE_COLOR,string); adverts=1; SetTimer("Adverts",15000,0); printf("%s", string); }else{SendClientMessage(playerid,COLOR_RED,"Must passing at least 15 seconds.");} }else{SendClientMessage(playerid,COLOR_RED,"Advertisement system is currently disabled.");} return 1; } if(strcmp(cmd,"/healLock",true)==0) { if(IsPlayerAdmin(playerid)) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); if(extra == 0) { heal=1;format(string,sizeof(string),"L'Admin %s ha attivato il sistema Heal.",name);}else{ heal=0;format(string,sizeof(string),"L'Amdin %s ha disattivato il sistema Heal.",name);} SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmdtext,"/kamikaze",true) == 0) { if(IsPlayerAdmin(playerid)) { new Float:x; new Float:y; new Float:z; GetPlayerPos(playerid,x,y,z); CreateExplosion(x,y,z,100,9999); CreateExplosion(x+2,y+2,z+2,10,100); CreateExplosion(x+4,y+4,z+4,10,100); CreateExplosion(x+6,y+6,z+6,10,100); CreateExplosion(x+8,y+8,z+8,10,100); CreateExplosion(x+10,y+10,z+10,10,100); CreateExplosion(x+12,y+12,z,10,100); CreateExplosion(x+14,y+14,z,10,100); CreateExplosion(x+16,y+16,z,10,100); CreateExplosion(x+18,y+18,z,10,100); CreateExplosion(x+20,y+20,z,10,100); CreateExplosion(x-2,y-2,z,10,100); CreateExplosion(x-4,y-4,z,10,100); CreateExplosion(x-6,y-6,z,10,100); CreateExplosion(x-8,y-8,z,10,100); CreateExplosion(x-10,y-10,z,10,100); CreateExplosion(x-12,y-12,z,10,100); CreateExplosion(x-14,y-14,z,10,100); CreateExplosion(x-16,y-16,z,10,100); CreateExplosion(x-18,y-18,z,10,100); CreateExplosion(x-20,y-10,z,10,100); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1; } if(strcmp(cmd,"/racetype", true)==0) {new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name));if(IsPlayerAdmin(playerid)) {ResetAdvise(playerid);format(string,sizeof(string),"The Admin %s has restarted this race: (%s)",name,rname);SendClientMessageToAll(0xFF8A00AA,string);}else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");}return 1;} if(strcmp(cmdtext,"/racetype race",true)==0) { if(IsPlayerAdmin(playerid)) { SetupForRace(); modality=1; new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"L'Admin %s ha caricato la seguente race: (%s)",name,rname);SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");} return 1;} if(strcmp(cmdtext,"/racetype drift", true)==0) { if(IsPlayerAdmin(playerid)) { SetupForRace(); modality=2; new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"L'Admin %s ha caricato la seguente race: (%s)",name,rname);SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");}return 1;} if(strcmp(cmdtext,"/racetype sprint",true)==0) { if(IsPlayerAdmin(playerid)) { SetupForRace(); modality=3; new name[MAX_PLAYER_NAME];GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"L'Admin %s ha caricato la seguente race: (%s)",name,rname);SendClientMessageToAll(0xFF8A00AA,string); }else{SendClientMessage(playerid,COLOR_RED,"Devi essere un admin");}return 1;} if(strcmp(cmd,"/race",true)==0) { if(race==1){ format(string,sizeof(string),"Current Race: %s",rname); SendClientMessage(playerid,COLOR_RED,string); }else{SendClientMessage(playerid,COLOR_RED,"La gara dev'essere iniziata per poter utilizzare questo cmd.");} return 1;} if(strcmp(cmd,"/startrace",true)==0) { if(IsPlayerAdmin(playerid)) { if(inconfirm!=1){ GameTextForAll("~w~La Race ~r~iniziera' ~w~tra 30 secondi~n~~r~Posizionatevi ~w~sul check.",5000,3); SetTimer("BackRace",30000,0); inconfirm = 1; for(new i=0; i=1) { Kick(killerid); GetPlayerName(killerid,name, sizeof(name)); format(string, sizeof(string), "%s, the n00b killer got kicked! Have a good gaming!",name); SendClientMessageToAll(0xFFF600AA, string); } else { GivePlayerMoney(killerid, -50000); SetPlayerScore(killerid, GetPlayerScore(killerid) - 1); SendClientMessage(killerid, 0xC10000AA, "No killing here! Once again and you will be kicked!"); SendClientMessage(playerid, 0xC10000AA, "Dont worry! One more kill and he/she will be kicked!"); SendDeathMessage(killerid, playerid, reason); kills[killerid]++; } } return 1; } public votetimer() { new string[256]; if (Pvotes - Nvotes >= 1) { ResetVoteStats(); modality = pidplayer; ResetVariables(); printf("Loaded Race: (%d)",pidplayer); format(string, sizeof(string), "The poll succeded with %d positive and %d negative votes!", Pvotes, Nvotes); SendClientMessageToAll(COLOR_SYSTEM, string); } else if (Pvotes - Nvotes < 1) { format(string, sizeof(string), "The poll failed with %d positive and %d negative votes!", Pvotes, Nvotes); SendClientMessageToAll(COLOR_SYSTEM, string); ResetVoteStats(); } return 1; } public Adverts() { adverts=0; return 1; } 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; } stock GetDistanceBetweenPlayers(playerid,playerid2) { new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2; new Float:dis; if (!IsPlayerConnected(playerid) || !IsPlayerConnected(playerid2)) { return -1; } GetPlayerPos(playerid,x1,y1,z1); GetPlayerPos(playerid2,x2,y2,z2); dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); return floatround(dis); } public MCountdown() { new string[256]; countdown--; if(countdown == 3 || countdown == 2 || countdown == 1) { for (new i=0; i