Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <core>
- #include <float>
- #include <a_Objects>
- new Text:info;
- #pragma tabsize 0
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_Spain 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000FFAA
- #define COLOR_BROWN 0x993300AA
- #define COLOR_ORANGE 0xFF9933AA
- #define COLOR_CYAN 0x99FFFFAA
- #define COLOR_PINK 0xFF66FFAA
- #define COLOR_BLACK 0x2C2727AA
- #define COLOR_LIGHTCYAN 0xAAFFCC33
- #define COLOR_LEMON 0xDDDD2357
- #define COLOR_AQUA 0x7CFC00AA
- #define COLOR_WHITEYELLOW 0xFFE87DFF
- #define COLOR_BLUEAQUA 0x7E60FFFF
- #define COLOR_DARKBLUE 0x15005EFF
- #define COLOR_ALIEN 0x90FF87FF
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_Netherlands 0x15005EFF
- #define COLOR_USA 0x90FF87FF
- #define COLOR_Germany 0xB8860BAA
- #define KICK_COLOR 0xFF0000FF
- #define COLOR_GANGGREEN 0x00FF0096
- #define COLOR_BLACK 0x2C2727AA
- #define COLOR_SBLUE 0x00BFFFAA
- #define INACTIVE_PLAYER_ID 255
- #define GIVECASH_DELAY 5000 // Time in ms between /givecash commands.
- #define NUMVALUES 4
- #define TEAM_Netherlands 1
- #define TEAM_USA 2
- #define TEAM_Germany 3
- #define TEAM_Spain 4
- forward MoneyGrubScoreUpdate();
- forward Givecashdelaytimer(playerid);
- forward SetupPlayerForClassSelection(playerid);
- forward GameModeExitFunc();
- forward SendPlayerFormattedText(playerid, const str[], define);
- forward public SendAllFormattedText(playerid, const str[], define);
- //------------------------------------------------------------------------------------------------------
- new iSpawnSet[MAX_PLAYERS];
- new gTeam[MAX_PLAYERS];
- //Round code stolen from mike's Manhunt Tongue
- //new gRoundTime = 3600000; // Round time - 1 hour
- //new gRoundTime = 1200000; // Round time - 20 mins
- //new gRoundTime = 900000; // Round time - 15 mins
- //new gRoundTime = 600000; // Round time - 10 mins
- //new gRoundTime = 300000; // Round time - 5 mins
- //new gRoundTime = 120000; // Round time - 2 mins
- //new gRoundTime = 60000; // Round time - 1 min
- new gActivePlayers[MAX_PLAYERS];
- new gLastGaveCash[MAX_PLAYERS];
- //------------------------------------------------------------------------------------------------------
- main()
- {
- print("\n----------------------------------");
- print(" WORLD WAR 6");
- print(" BY DutchAndGangs");
- print(" World War 6 The Best Game");
- print("----------------------------------\n");
- }
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- /*public GrubModeReset()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- SetPlayerScore(i, PocketMoney);
- SetPlayerRandomSpawn(i, classid);
- }
- }
- }*/
- //------------------------------------------------------------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- GameTextForPlayer(playerid,"~w~World War 6: ~rWelcome to Your WAR",5000,5);
- SendPlayerFormattedText(playerid, "Welcome to DutchAndGangs WORLD WAR 6!", 0);
- gActivePlayers[playerid]++;
- gLastGaveCash[playerid] = GetTickCount();
- SetPlayerMapIcon( playerid, 0, 214.194396,1863.726440,13.140625, 58, 0 );
- SetPlayerMapIcon( playerid, 1, -228.306442,2729.432861,62.687500, 59, 0 );
- SetPlayerMapIcon( playerid, 2, -1309.324707,2494.259033,89.867187, 60, 0 );
- SetPlayerMapIcon( playerid, 3, 384.733917,2458.126708,16.500000, 6, 0 );
- SetPlayerMapIcon( playerid, 4, 384.733917,2458.126708,16.500000, 6, 0 );
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDisconnect(playerid)
- {
- gActivePlayers[playerid]--;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new playermoney;
- new sendername[MAX_PLAYER_NAME];
- new giveplayer[MAX_PLAYER_NAME];
- new cmd[256];
- new giveplayerid, moneys, idx;
- cmd = strtok(cmdtext, idx);
- if(strcmp(cmd, "/help", true) == 0) {
- SendPlayerFormattedText(playerid,"***********Server support***********",0);
- SendPlayerFormattedText(playerid," /Commands",0);
- SendPlayerFormattedText(playerid," /Rules",0);
- SendPlayerFormattedText(playerid," /objective", 0);
- return 1;
- }
- if(strcmp(cmd, "/objective", true) == 0) {
- SendPlayerFormattedText(playerid," WORLD WAR 6 Menu",0);
- SendPlayerFormattedText(playerid," /WeatherMenu",0);
- SendPlayerFormattedText(playerid," /WeaponMenu",0);
- SendPlayerFormattedText(playerid," Voor Rcon Admins»", 0);
- SendPlayerFormattedText(playerid," /Rcon Login [password]", 0);
- return 1;
- }
- if(strcmp(cmd, "/Rules", true) == 0) {
- SendPlayerFormattedText(playerid," No Cheat Or Ban. Geen Gecheat Of Gebang",0);
- SendPlayerFormattedText(playerid," No Kill Team Or Jail/Kick. Geen Team Leden Vermoorden, Kicken En Gevangen Houden",0);
- SendPlayerFormattedText(playerid," Listen Team. Luister Naar Je Team Genoten",0);
- SendPlayerFormattedText(playerid," Respect Al Admins. Respecteer Alle Admins", 0);
- SendPlayerFormattedText(playerid," Many Fun Game. Veel Speel Plezier", 0);
- return 1;
- }
- if(strcmp(cmd, "/Commands", true) == 0) {
- SendClientMessage(playerid, COLOR_BLUE," /givecash [playerid] [amount] ");
- SendClientMessage(playerid, COLOR_BLUE," /STATS ");
- SendClientMessage(playerid, COLOR_BLUE," /Report id reasoS ");
- SendClientMessage(playerid, COLOR_BLUE," /kill ");
- return 1;
- }
- if(strcmp(cmd, "/givecash", true) == 0) {
- new tmp[256];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
- return 1;
- }
- giveplayerid = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- //printf("givecash_command: %d %d",giveplayerid,moneys);
- if (IsPlayerConnected(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), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
- }
- else {
- SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
- }
- }
- else {
- format(string, sizeof(string), "%d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- // PROCESS OTHER COMMANDS
- return 0;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerSpawn(playerid)
- {
- SetPlayerInterior(playerid,0);
- TogglePlayerClock(playerid,0);
- SetPlayerToTeamColor(playerid);
- SetWeather(12);
- return 1;
- }
- forward SetPlayerToTeamColor(playerid);
- public SetPlayerToTeamColor(playerid)
- {
- if (gTeam[playerid] == TEAM_Netherlands) //|| GetPlayerTeam(playerid) == 1)
- {
- SetPlayerColor(playerid, COLOR_Netherlands);
- SetPlayerInterior(playerid,0);
- SetPlayerArmour(playerid,1000);
- }
- else if (gTeam[playerid] == TEAM_USA) //|| GetPlayerTeam(playerid) == 2)
- {
- SetPlayerColor(playerid, COLOR_USA);
- SetPlayerInterior(playerid,0);
- SetPlayerArmour(playerid,1000);
- }
- else if (gTeam[playerid] == TEAM_Germany) //|| GetPlayerTeam(playerid) == 3)
- {
- SetPlayerColor(playerid, COLOR_Germany);
- SetPlayerInterior(playerid,0);
- SetPlayerArmour(playerid,1000);
- }
- else if (gTeam[playerid] == TEAM_Spain) //|| GetPlayerTeam(playerid) == 4)
- {
- SetPlayerColor(playerid, COLOR_Spain);
- SetPlayerInterior(playerid,0);
- SetPlayerArmour(playerid,1000);
- }
- }
- //------------------------------------------------------------------------------------------------------
- /* public OnPlayerDeath(playerid, killerid, reason)
- { haxed by teh mike
- new name[MAX_PLAYER_NAME];
- new string[256];
- new deathreason[20];
- new playercash;
- GetPlayerName(playerid, name, sizeof(name));
- GetWeaponName(reason, deathreason, 20);
- if (killerid == INVALID_PLAYER_ID) {
- switch (reason) {
- case WEAPON_DROWN:
- {
- format(string, sizeof(string), "*** %s drowned.)", name);
- }
- default:
- {
- if (strlen(deathreason) > 0) {
- format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
- } else {
- format(string, sizeof(string), "*** %s died.", name);
- }
- }
- }
- }
- else {
- new killer[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killer, sizeof(killer));
- if (strlen(deathreason) > 0) {
- format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason);
- } else {
- format(string, sizeof(string), "*** %s killed %s.", killer, name);
- }
- }
- SendClientMessageToAll(COLOR_RED, string);
- {
- playercash = GetPlayerMoney(playerid);
- if (playercash > 0)
- {
- GivePlayerMoney(killerid, playercash);
- ResetPlayerMoney(playerid);
- }
- else
- {
- }
- }
- return 1;
- }*/
- //------------------------------------------------------------------------------------------------------
- public OnPlayerRequestClass(playerid, classid)
- {
- iSpawnSet[playerid] = 0;
- SetupPlayerForClassSelection(playerid);
- SetPlayerTeamFromClass(playerid, classid);
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
- SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
- }
- public GameModeExitFunc()
- {
- GameModeExit();
- }
- public OnGameModeInit()
- {
- SetGameModeText("WORLD WAR 6");
- UsePlayerPedAnims();
- AllowInteriorWeapons(1);
- SetWeather(32);
- ShowPlayerMarkers(1);
- ShowNameTags(1);
- info = TextDrawCreate(0.0, 434.0,"WORLD WAR 6: DutchAndGangs.tk");
- TextDrawFont(info,0);
- TextDrawLetterSize(info,1,1);
- TextDrawColor(info,0xF600FF);
- TextDrawSetShadow(info,1);
- TextDrawSetOutline(info,1);
- TextDrawBackgroundColor(info,0x000FF);
- TextDrawUseBox(info,0);
- // Player Class's
- AddPlayerClass(287,214.194396,1863.726440,13.140625,270.1425,31,3121,24,300,16,100);
- AddPlayerClass(285,-228.306442,2729.432861,62.687500,270.1425,31,3120,24,300,16,100);
- AddPlayerClass(277,-1309.324707,2494.259033,89.867187,270.1425,30,3120,24,300,16,100);
- // Car Spawns
- AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
- AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
- AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
- //ROMANIA
- AddStaticVehicle(432,278.9016,1950.7509,17.6532,88.9054,43,0); // Hunter
- AddStaticVehicle(432,282.3510,1987.1381,17.6535,87.2516,43,0); // Hunter
- AddStaticVehicle(432,278.2103,2020.6830,17.6535,98.7492,43,0); // Hunter
- AddStaticVehicle(425,342.1974,1874.3889,18.3136,104.1868,34,0); // Hunter
- AddStaticVehicle(425,339.5558,1855.1088,18.5525,108.6887,43,0); // Hunter
- AddStaticVehicle(520,338.5540,1930.7616,18.7074,272.5084,0,0); // Hydra
- AddStaticVehicle(520,358.0111,1916.5072,18.6420,266.0934,0,0); // Hydra
- AddStaticVehicle(520,358.7953,1892.7484,18.3639,109.5348,0,0); // Hydra
- AddStaticVehicle(520,366.4059,1960.9697,18.3639,280.4560,0,0); // Hydra
- AddStaticVehicle(520,331.8059,1968.1923,18.3639,97.8575,0,0); // Hydra
- AddStaticVehicle(425,343.2718,1946.3412,18.2241,274.0224,43,0); // Hunter
- AddStaticVehicle(520,229.651931,1892.521972,17.211687,274.0224,43,0); // Hydra
- AddStaticVehicle(432,182.544204,1909.152343,17.469060,274.0224,43,0); // Rhino
- AddStaticVehicle(470,184.454849,1948.658813,17.396722,0.0,43,0); // Patriot
- AddStaticVehicle(470,184.454849,1953.658813,17.396722,0.0,43,0); // Patriot
- //USA
- AddStaticVehicle(470,-224.073669,2751.190185,62.539062,274.0224,43,0); // Patriot
- AddStaticVehicle(470,-224.073669,2755.190185,62.539062,274.0224,43,0); // Patriot
- AddStaticVehicle(520,-197.495452,2725.493164,62.687500,280.4560,0,0); // Hydra
- AddStaticVehicle(432,-257.033142,2701.294189,62.535140,88.2516,43,0); // Rhino
- AddStaticVehicle(425,-294.516601,2741.593261,61.895484,100.2516,43,0); // Hunter
- AddStaticVehicle(520,-306.612548,2676.907470,62.599357,60.2516,43,0); // Hydra
- //Rusia
- AddStaticVehicle(470,-1294.959960,2447.247558,88.042465,0.0,43,0); // Patriot
- AddStaticVehicle(470,-1297.959960,2447.247558,88.042465,0.0,43,0); // Patriot
- AddStaticVehicle(470,-1291.959960,2447.247558,88.042465,0.0,43,0); // Patriot
- AddStaticVehicle(520,-1329.691162,2488.202148,87.046875,120.0,43,0); // Hydra
- AddStaticVehicle(425,-1302.751953,2479.679687,87.278709,0.0,43,0); // Hunter
- AddStaticVehicle(432,-1298.280273,2504.918212,86.957275,88.2516,43,0); // Rhino
- AddStaticPickup(371, 15, -320.800262,2742.728759,62.952674); //para
- AddStaticPickup(370, 15, 384.733917,2474.126708,16.500000); //para
- AddStaticPickup(355, 15, 384.733917,2472.126708,16.500000); //para
- AddStaticPickup(352, 15, 384.733917,2470.126708,16.500000); //para
- AddStaticPickup(351, 15, 384.733917,2468.126708,16.500000); //para
- AddStaticPickup(350, 15, 384.733917,2466.126708,16.500000); //para
- AddStaticPickup(349, 15, 384.733917,2464.126708,16.500000); //para
- AddStaticPickup(348, 15, 384.733917,2462.126708,16.500000); //para
- AddStaticPickup(344, 15, 384.733917,2460.126708,16.500000); //para
- AddStaticPickup(342, 15, 384.733917,2458.126708,16.500000); //para
- AddStaticPickup(359, 15, 384.733917,2456.126708,16.500000); //para
- AddStaticPickup(358, 15, 384.733917,2454.126708,16.500000); //para
- AddStaticPickup(357, 15, 384.733917,2452.126708,16.500000); //para
- AddStaticPickup(356, 15, 384.733917,2450.126708,16.500000); //para
- AddStaticPickup(366, 15, 384.733917,2448.126708,16.500000); //para
- AddStaticPickup(367, 15, 384.733917,2446.126708,16.500000); //para
- AddStaticPickup(365, 15, 384.733917,2444.126708,16.500000); //para
- AddStaticPickup(364, 15, 384.733917,2442.126708,16.500000); //para
- AddStaticPickup(363, 15, 384.733917,2440.126708,16.500000); //para
- //objects
- CreateObject (3819, 2495,4912109375, -1657,5728759766, 13.356578826904, 0, 0, 0);//bank
- CreateObject (3819, 2495,5092773438, -1666,2803955078, 13.341507911682, 0, 0, 0);//bank
- CreateObject (3819, 2495,2939453125, -1679,7937011719, 13.336633682251, 0, 0 , 0);//bank
- CreateObject (13630, 2502,5231933594, -1669,6782226563, 25.025682449341, 0, 0, 0);//score bord
- SetTimer("MoneyGrubScoreUpdate", 1000, 1);
- //SetTimer("GameModeExitFunc", gRoundTime, 0);
- return 1;
- }
- forward SetPlayerTeamFromClass(playerid,classid);
- public SetPlayerTeamFromClass(playerid, classid)
- {
- switch(classid)
- {
- case 0:
- {
- GameTextForPlayer(playerid, "~b~Netherlands", 1500, 6);
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
- SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
- gTeam[playerid] = TEAM_Netherlands;
- SetPlayerTeam(playerid,1);
- ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
- }
- case 1:
- {
- GameTextForPlayer(playerid, "~g~~h~USA", 1500, 6);
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
- SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
- gTeam[playerid] = TEAM_USA;
- SetPlayerTeam(playerid,2);
- ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
- }
- case 2:
- {
- GameTextForPlayer(playerid, "~b~Germany", 1500, 6);
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
- SetPlayerFacingAngle(playerid, 357.1708);
- SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
- SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
- gTeam[playerid] = TEAM_Germany;
- SetPlayerTeam(playerid,3);
- ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
- }
- case 3:
- {
- GameTextForPlayer(playerid, "~b~Spain", 1500, 6);
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
- SetPlayerFacingAngle(playerid, 280.0);
- SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
- SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
- gTeam[playerid] = TEAM_Spain;
- SetPlayerTeam(playerid,3);
- ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
- }
- }
- }
- public SendPlayerFormattedText(playerid, const str[], define)
- {
- new tmpbuf[256];
- format(tmpbuf, sizeof(tmpbuf), str, define);
- SendClientMessage(playerid, 0xFF004040, tmpbuf);
- }
- public SendAllFormattedText(playerid, const str[], define)
- {
- new tmpbuf[256];
- format(tmpbuf, sizeof(tmpbuf), str, define);
- SendClientMessageToAll(0xFFFF00AA, tmpbuf);
- }
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement