Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define Round_MaxTime 360000
- #define TEAM_HUMAN 0
- #define TEAM_ZOMBIE 1
- #define COLOR_HUMAN 0x6495EDAA
- #define COLOR_ZOMBIE 0xFF0000AA
- #define WEAPON1_HUMAN 24
- #define WEAPON2_HUMAN 25
- #define WEAPON3_HUMAN 31
- #define WEAPON1_ZOMBIE 4
- #define WEAPON2_ZOMBIE 15
- #define WEAPON3_ZOMBIE 41
- #define COLOR_RED 0xFF0000AA
- #define COLOR_BLUE 0x0000FFAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_GREEN 0x66CC99AA
- enum aInfo
- {
- HumansCount,
- ZombiesCount,
- HumansKills,
- ZombiesKills,
- ID
- };
- enum pInfo
- {
- TotalCount,
- Team
- };
- new Arena[aInfo];
- new PlayerCount;
- new PlayerTeam[MAX_PLAYERS];
- new Text[256];
- new Float:OldHP[MAX_PLAYERS];
- forward AnnounceWinner();
- forward ChangeRound();
- forward OnPlayerUpdate(playerid);
- main()
- {
- print("|||||||||||||||||||||||||||||||||||||||||||||||||||||||");
- print("| ZOMBIEMOD - G0D4V1D & GhOsT |");
- print("| EDITOR - JUNIOR_FUSION |");
- print("| Provavelmeente você nunca viu um Gamemode como este |");
- print("| Aproveite esse ótimo gamemode de Zumbis |");
- print("|||||||||||||||||||||||||||||||||||||||||||||||||||||||");
- }
- stock HumanTeam(playerid)
- {
- SendClientMessage(playerid,COLOR_HUMAN,"Salve a sociedade!");
- GivePlayerWeapon(playerid,WEAPON1_HUMAN,9999);
- GivePlayerWeapon(playerid,WEAPON2_HUMAN,9999);
- GivePlayerWeapon(playerid,WEAPON3_HUMAN,9999);
- SetPlayerColor(playerid,COLOR_HUMAN);
- SetPlayerTeam(playerid,0);
- SetPlayerArmour(playerid,100);
- SetPlayerSkin(playerid,288);
- }
- stock ZombieTeam(playerid)
- {
- ResetPlayerWeapons(playerid);
- SetPlayerArmour(playerid,0);
- SetPlayerSkin(playerid,78);
- SendClientMessage(playerid,COLOR_ZOMBIE,"Coma alguns cérebros!");
- GivePlayerWeapon(playerid,WEAPON1_ZOMBIE,9999);
- GivePlayerWeapon(playerid,WEAPON2_ZOMBIE,9999);
- GivePlayerWeapon(playerid,WEAPON3_ZOMBIE,9999);
- SetPlayerColor(playerid,COLOR_ZOMBIE);
- SetPlayerTeam(playerid,1);
- SetPlayerHealth(playerid,450);
- TogglePlayerControllable(playerid,1);
- }
- public OnGameModeInit()
- {
- AddPlayerClass(288,0.0,0.0,5.0,0.0,0,0,0,0,0,0);
- AddPlayerClass(78,0.0,0.0,5.0,0.0,0,0,0,0,0,0);
- SendRconCommand("hostname Brasil Mundo dos Zombies");
- SetGameModeText("BR ZOMBIE v1.0");
- SendRconCommand("mapname Mundo dos Zumbies");
- SetWorldTime(0);
- SetNameTagDrawDistance(5);
- SetTeamCount(2);
- ShowNameTags(0);
- ShowPlayerMarkers(0);
- UsePlayerPedAnims();
- AllowInteriorWeapons(1);
- DisableInteriorEnterExits();
- Arena[ID] = 0;
- SetTimer("AnnounceWinner",360000,1);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Bem vindo ao: Brasil Mundo dos Zumbies!!");
- SendClientMessage(playerid,COLOR_YELLOW,"Digite /aprender para alguma ajuda.");
- SendClientMessage(playerid,COLOR_RED,"Criadores: Davidovich & GhOsT.");
- SendClientMessage(playerid,COLOR_HUMAN,"Editores da nova versão: Junior_FusioN");
- PlayerCount ++;
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- PlayerCount --;
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(PlayerTeam[playerid] == 0)
- {
- HumanTeam(playerid);
- SetPlayerTeam(playerid,0);
- }
- else if(PlayerTeam[playerid] == 1)
- {
- ZombieTeam(playerid);
- SetPlayerTeam(playerid,1);
- }
- switch(Arena[ID])
- {
- case 0:
- {
- if(PlayerTeam[playerid] == 0)
- {
- SetPlayerPos(playerid,1300.0236,-790.1140,1084.0078);
- SetPlayerFacingAngle(playerid,0.3154);
- SetPlayerInterior(playerid,5);
- }
- if(PlayerTeam[playerid] == 1)
- {
- SetPlayerPos(playerid,1266.4395,-780.0988,1091.9063);
- SetPlayerFacingAngle(playerid,269.7846);
- SetPlayerInterior(playerid,5);
- }
- }
- case 1:
- {
- if(PlayerTeam[playerid] == 0)
- {
- SetPlayerPos(playerid,2220.3972,-1151.4685,1025.7969);
- SetPlayerFacingAngle(playerid,269.3734);
- SetPlayerInterior(playerid,15);
- }
- if(PlayerTeam[playerid] == 1)
- {
- SetPlayerPos(playerid,2193.5583,-1141.1141,1029.7969);
- SetPlayerFacingAngle(playerid,178.7957);
- SetPlayerInterior(playerid,15);
- }
- }
- case 2:
- {
- if(PlayerTeam[playerid] == 0)
- {
- SetPlayerPos(playerid,2346.9094,-1172.8066,1031.9766);
- SetPlayerFacingAngle(playerid,85.3327);
- SetPlayerInterior(playerid,5);
- }
- if(PlayerTeam[playerid] == 1)
- {
- SetPlayerPos(playerid,2349.6428,-1181.0731,1027.9766);
- SetPlayerFacingAngle(playerid,87.8066);
- SetPlayerInterior(playerid,5);
- }
- }
- case 3:
- {
- if(PlayerTeam[playerid] == 0)
- {
- SetPlayerPos(playerid,366.8517,215.5397,1008.3828);
- SetPlayerFacingAngle(playerid,178.3608);
- SetPlayerInterior(playerid,3);
- }
- if(PlayerTeam[playerid] == 1)
- {
- SetPlayerPos(playerid,348.3492,162.2359,1025.7891);
- SetPlayerFacingAngle(playerid,269.5417);
- SetPlayerInterior(playerid,3);
- }
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid)
- {
- if(PlayerTeam[playerid] == 0)
- {
- Arena[ZombiesKills] ++;
- }
- else if(PlayerTeam[playerid] == 1)
- {
- Arena[HumansKills] ++;
- }
- switch(Arena[ZombiesKills])
- {
- case 5: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 5");
- case 10: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 10");
- case 15: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 15");
- case 20: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 20");
- case 25: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 25");
- case 30: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 30");
- case 35: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 35");
- case 40: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 40");
- case 45: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 45");
- case 50:
- {
- SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 50");
- AnnounceWinner();
- }
- }
- switch(Arena[HumansKills])
- {
- case 5: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 5");
- case 10: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 10");
- case 15: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 15");
- case 20: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 20");
- case 25: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 25");
- case 30: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 30");
- case 35: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 35");
- case 40: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 40");
- case 45: SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 45");
- case 50:
- {
- SendClientMessageToAll(COLOR_BLUE,"SCORE - TIME HUMANOS:: 50");
- AnnounceWinner();
- }
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid,classid)
- {
- SetPlayerPos(playerid,299.9177,2741.7598,42.9127);
- SetPlayerFacingAngle(playerid,198.9686);
- SetPlayerCameraPos(playerid,306.3498,2727.6697,37.0493);
- SetPlayerCameraLookAt(playerid,299.9177,2741.7598,42.9127);
- if(classid == 0)
- {
- PlayerTeam[playerid] = 0;
- SetPlayerTeam(playerid,0);
- }
- else if(classid == 1)
- {
- PlayerTeam[playerid] = 1;
- SetPlayerTeam(playerid,1);
- }
- return 1;
- }
- public AnnounceWinner()
- {
- if(Arena[ZombiesKills] > Arena[HumansKills])
- {
- GameTextForAll("~r~ZOMBIES~w~ VENCERAM~y~ ]]",3000,5);
- format(Text,256,"Humanos infectados: %d | Zumbis mortos: %d",
- Arena[ZombiesKills],Arena[HumansKills]);
- SendClientMessageToAll(COLOR_YELLOW,Text);
- }
- if(Arena[ZombiesKills] < Arena[HumansKills])
- {
- GameTextForAll("~b~HUMANS~w~ VENCERAM~y~ ]]",3000,5);
- format(Text,256,"Zumbis mortos: %d | Humanos infeectados: %d",
- Arena[HumansKills],Arena[ZombiesKills]);
- SendClientMessageToAll(COLOR_YELLOW,Text);
- }
- if(Arena[ZombiesKills] == Arena[HumansKills])
- {
- GameTextForAll("~y~ EMPATE",3000,5);
- format(Text,256,"Os dois times tiveram %d perdas.",
- Arena[ZombiesKills]);
- SendClientMessageToAll(COLOR_YELLOW,Text);
- }
- Arena[ID] ++;
- SetTimer("ChangeRound",10000,0);
- SendClientMessageToAll(COLOR_RED,"Espere 10 segundos até o próximo round começar!");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- SetPlayerCameraPos(i,-1438.0342,1751.5375,45.6543);
- SetPlayerCameraLookAt(i,-1736.0754,1132.5067,45.6543);
- SetPlayerInterior(i,0);
- }
- return 1;
- }
- public ChangeRound()
- {
- Arena[ZombiesKills] = 0;
- Arena[HumansKills] = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- SpawnPlayer(i);
- switch(Arena[ID])
- {
- case 0:
- {
- SetPlayerInterior(i,5);
- }
- case 1:
- {
- SetPlayerInterior(i,15);
- }
- case 2:
- {
- SetPlayerInterior(i,5);
- }
- case 3:
- {
- SetPlayerInterior(i,3);
- Arena[ID] = 0;
- }
- }
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new Float:NewHP;
- GetPlayerArmour(playerid,NewHP);
- if(NewHP < OldHP[playerid])
- {
- new Skin = GetPlayerSkin(playerid);
- if(Skin == 285)
- {
- ZombieTeam(playerid);
- Arena[ZombiesKills] ++;
- switch(Arena[ZombiesKills])
- {
- case 5: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 5");
- case 10: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 10");
- case 15: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 15");
- case 20: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 20");
- case 25: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 25");
- case 30: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 30");
- case 35: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 35");
- case 40: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 40");
- case 45: SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 45");
- case 50:
- {
- SendClientMessageToAll(COLOR_RED,"SCORE - TIME ZUMBIS: 50");
- AnnounceWinner();
- }
- }
- }
- }
- OldHP[playerid] = NewHP;
- return 1;
- }
- public OnPlayerCommandText(playerid,cmdtext[])
- {
- if(strcmp(cmdtext,"/aprender",true)==0)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Esse é um gamemode baseado em Humanos VS Zumbis.");
- SendClientMessage(playerid,COLOR_YELLOW,"Zumbis devem esfaquear humanos para infectá-los.");
- SendClientMessage(playerid,COLOR_YELLOW,"Humanos devem fugir e tentar matar os Zumbis.");
- SendClientMessage(playerid,COLOR_RED,"[AVISO]Zumbis tem 450 de HP, não 100!");
- SendClientMessage(playerid,COLOR_GREEN,"Gamemode trago até você por Junior_FusioN");
- return 1;
- }
- SendClientMessage(playerid,COLOR_RED,"[ERRO]: Comandos incorreto!");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement