Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //========================================================================================================//
- //========================================================================================================//
- //============================================ Grove Vs Vagos ============================================//
- //============================================ Gamemode ==================================================//
- //============================================ by WarF ===================================================//
- //========================================================================================================//
- //========================================================================================================//
- /*
- ----------------- Version 0.1 ----------------- ----------------- ----------------- ----------------- ----------------- -----------------
- - 2 Teams ( Grove Street & Vagos )
- - Beide Teams besitzen eine eigene Base mit Fahrzeugen
- - Score/Punktezähler!
- - Server Textdraw unten Links!
- - Connect und Disconnect Nachrichten
- - Gangfight TIME --> Dauer 15 Minuten!
- - Waffenspawn beider Teams jeweils eine Deagle und M4
- - Bei KILL [ GANGZONEKILL] Funktion
- - Wetter System (verschiedenes Wetter in LS/SF/LV) mit Wechsel!
- - 1 nicht Offiziele Gangfight Zone! mit TeleportBefehl /gangfight
- Grove Spawn unv Vagos Gebiet Spawn ist Unterschiedlich!
- - GANGZONEKILLS sind überall machbar, nicht nur im Gebiet, das Gebiet dient dazu damit das ganze Schneller geht!
- - Die ersten Gang die 30 Kills erreicht gewinnt das Gangfight und der Server wird neu gestartet!
- ----------------- ----------------- ----------------- ----------------- ----------------- ----------------- -----------------
- In der Version 0.2 (bald)
- - Kills nur in der Zone machbar
- - Ammunations
- - Farzeuge nur durch eigene Member fahrbar
- - Leadersystem
- - Adminsystem
- - Login/Register System
- - CTF System!
- - Mehrere Gebiete zum einnehmen!
- ----------------- ----------------- ----------------- ----------------- ----------------- ----------------- -----------------*/
- #include <a_samp>
- // FARBEN DEFINIERUNG //
- #define COLOR_LIGHTGREEN 0x9ACD32AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define GREEN 0x21DD00FF
- #define GROVE_COLOR 0x00D900C8
- #define VAGOS_COLOR 0xFFC801C8
- #define COLOR_GREEN 0x008000FF
- // TEAM / GANGS //
- static gTeam[MAX_PLAYERS];
- #define TEAM_GROVE 0
- #define TEAM_VAGOS 1
- // VARIABLEN //
- new Grovescore;
- new Vagosscore;
- // NEWS //
- new Text:Textdraw;
- new Text:scores;
- new DasWetter[3];
- new WetterRandomLS[] = { 1,2,3,15 };
- new WetterRandomSF[] = { 5,6,16 };
- new WetterRandomLV[] = { 1,2,3,4,5,18 };
- // GAMEMODE ZEIT --> Restart! //
- #define MAX_GM_TIME 900000 // 15 Minuten
- // FORWARDS //
- forward PunkteUpdate();
- forward PunkteCheck(playerid);
- forward SetupPlayerForClassSelection(playerid);
- forward KillUpdate(playerid);
- forward GameTime();
- forward Finish();
- forward Wetter();
- forward SetWetter();
- // STOCKS //
- stock Grove(playerid)
- {
- SetPlayerColor(playerid,GROVE_COLOR);
- }
- stock Vagos(playerid)
- {
- SetPlayerColor(playerid,VAGOS_COLOR);
- }
- stock strget(strx[], pos, search = ' ') {
- new arg, ret[128], idxx;
- for (new i = 0; i < strlen(strx); i++) {
- if(strx[i] == search || i == strlen(strx) || strx[i + 1] == 10) {
- arg++;
- if (arg == pos + 1){
- ret[i-idxx] = EOS;
- return ret;
- } else if (arg == pos)
- idxx= i+1;
- }
- else if (arg == pos)
- ret[i - idxx] = strx[i];
- }
- return ret;
- }
- //==========================================================================================================================================================
- //==========================================================================================================================================================
- //==========================================================================================================================================================
- //==========================================================================================================================================================
- //==========================================================================================================================================================
- //==========================================================================================================================================================
- public OnGameModeInit()
- {
- SetGameModeText("Grove Vs Vagos");
- AddPlayerClass(271,2495.4700,-1691.1353,14.7656,88.7245,24,999,31,1000,0,0); // Groveskin
- AddPlayerClass(108,2526.5800,-1033.9400,69.5800,255.1027,24,999,31,1000,0,0); // Vagosskin
- // TIMER //
- SetTimer("Finish",600000,true);
- SetTimer("KillUpdate", 1000, true);
- SetTimer("PunkteUpdate", 1000, true);
- SetTimer("PunkteCheck", 1000, true);
- SetTimer("Wetter",900000, 1);
- SetTimer("SetWetter",1000, 1);
- // SONSTIGES //
- ShowNameTags(1);
- SetWorldTime(0);
- UsePlayerPedAnims();
- ShowPlayerMarkers(0);
- // TEXTDRAWS //
- Textdraw = TextDrawCreate(86.000000,427.000000,"Gangfight Version 0.1");
- TextDrawAlignment(Textdraw,2);
- TextDrawBackgroundColor(Textdraw,0x000000AA);
- TextDrawFont(Textdraw,2);
- TextDrawLetterSize(Textdraw,0.3000000,1.500000);
- TextDrawColor(Textdraw,0xffffffff);
- TextDrawSetOutline(Textdraw,1);
- TextDrawSetProportional(Textdraw,1);
- TextDrawSetShadow(Textdraw,1);
- // AUTOS //
- //-------------------------------------[Groove Autos]--------------------------------------------
- CreateVehicle(567,2499.7290,-1654.8717,13.3254,71.0974,86,86,600);
- CreateVehicle(521,2516.6213,-1662.9662,13.7545,90.7617,86,86,600);
- CreateVehicle(521,2516.5188,-1666.5355,13.7126,83.6155,86,86,600);
- CreateVehicle(521,2516.2712,-1672.2604,13.6695,63.1034,86,86,600);
- CreateVehicle(480,2508.1079,-1676.7578,13.3137,332.5577,86,86,600);
- CreateVehicle(560,2510.8142,-1686.6290,13.3836,46.0711,86,86,600);
- CreateVehicle(560,2490.7900,-1683.3960,13.2661,267.7853,86,86,600);
- CreateVehicle(560,2474.8696,-1691.6924,13.3387,358.5612,86,86,600);
- CreateVehicle(581,2528.3508,-1669.9441,14.7634,90.3716,86,86,600);
- CreateVehicle(581,2528.5940,-1669.9423,14.7675,90.3665,86,86,600);
- CreateVehicle(581,2528.4438,-1665.1663,14.7650,89.4413,86,86,600);
- CreateVehicle(581,2528.5955,-1667.4940,14.7663,91.0834,86,86,600);
- //-------------------------------------[Vagos Autos]--------------------------------------------
- CreateVehicle(560,2530.3804,-1060.4600,69.2794,1.1289,6,6,600);
- CreateVehicle(560,2542.5305,-1033.3461,69.2811,179.9033,6,6,600);
- CreateVehicle(560,2551.0547,-1033.8213,69.2879,178.7793,6,6,600);
- CreateVehicle(480,2535.2632,-1035.0022,69.3542,178.9464,6,6,600);
- CreateVehicle(567,2543.4131,-1059.4493,69.4406,0.5185,6,6,600);
- CreateVehicle(461,2523.4219,-1036.8049,69.1395,181.9150,6,6,600);
- CreateVehicle(461,2521.9907,-1036.8163,69.1395,183.8141,6,6,600);
- CreateVehicle(461,2520.6208,-1036.8464,69.1593,183.9953,6,6,600);
- CreateVehicle(461,2519.1287,-1036.9431,69.1559,177.9429,6,6,600);
- CreateVehicle(461,2517.6431,-1036.8402,69.1237,175.1526,6,6,600);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetupPlayerForClassSelection(playerid);
- switch (classid)
- {
- case 0:
- {
- GameTextForPlayer(playerid, "~g~Groves", 1200, 3);
- }
- case 1:
- {
- GameTextForPlayer(playerid, "~COLOR_YELLOW~Vagos", 1200, 3);
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Bitte Warten...");
- new string[64];
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, " ");
- SendClientMessageToAll(0xFFFFFFAA,string);
- GameTextForPlayer(playerid,"~r~ Wilkommen waehle dein Team!",6000,5);
- if(IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Wilkommen auf dem Grove vs Vagos Server!");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Auf dem Server kannst du Fighten und durch Kills Punkte erzielen!");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Die erste Gang die 30 Punkte erzielt, gewinnt somit diese Runde!!");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Anschließend folgt ein kleiner Restart und es kann die nächste Runde beginnen!");
- SendClientMessage(playerid, COLOR_LIGHTGREEN, "SERVER: Wir wünschen dir viel Spaß!!");
- }
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerInterior(playerid,11);
- SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
- SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
- SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
- SetPlayerFacingAngle(playerid,0.0);
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- format(string,sizeof string,"%s hat den Server betreten!",pName);
- }
- public OnPlayerSpawn(playerid)
- {
- if(gTeam[playerid] == TEAM_GROVE)
- {
- GivePlayerWeapon(playerid,24,600);
- GivePlayerWeapon(playerid,31,999);
- SetPlayerTeam(playerid,0);
- Grove(playerid);
- SetPlayerInterior(playerid,0);
- TextDrawShowForPlayer(playerid, Textdraw);
- }
- else if(gTeam[playerid] == TEAM_VAGOS)
- {
- GivePlayerWeapon(playerid,24,600);
- GivePlayerWeapon(playerid,31,999);
- SetPlayerTeam(playerid,0);
- SetPlayerInterior(playerid,0);
- Vagos(playerid);
- TextDrawShowForPlayer(playerid, Textdraw);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid == TEAM_VAGOS)
- {
- GameTextForPlayer(playerid, "~g~GANGZONE~r~KILL", 5000, 5);
- Vagosscore += 1;
- }
- if(killerid == TEAM_GROVE)
- {
- GameTextForPlayer(playerid, "~g~GANGZONE~r~KILL", 5000, 5);
- Grovescore += 1;
- }
- SendDeathMessage(killerid,playerid,reason);
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/gangfight", true))
- {
- if(gTeam[playerid] == TEAM_GROVE)
- {
- SetPlayerPos(playerid, 2478.4541,-1370.8633,28.5406);
- }
- if(gTeam[playerid] == TEAM_VAGOS)
- {
- SetPlayerPos(playerid, 2478.5095,-1351.6801,27.0582);
- }
- return 1;
- }
- return 0;
- }
- public PunkteUpdate()
- {
- new string[100];
- TextDrawHideForAll(Text:scores);
- format(string,sizeof(string),"~y~Vagos:%d ~w~--------~g~Grove:%d", Vagosscore,Grovescore);
- scores = TextDrawCreate(271.000000,400.000000,string);
- TextDrawTextSize(scores,200.000000,0.000000);
- TextDrawSetOutline(scores,1);
- TextDrawSetShadow(scores,1);
- TextDrawShowForAll(Text:scores);
- }
- public PunkteCheck(playerid)
- {
- if (Grovescore >= 30) {
- Grovescore = 0;
- Vagosscore = 0;
- GameTextForAll("~g~Grove haben Gewonnen",6000,5);
- SetPlayerHealth(playerid, 0);
- SetTimer("Finish",MAX_GM_TIME,true);
- }
- if (Vagosscore >= 30) {
- Grovescore = 0;
- Vagosscore = 0;
- GameTextForAll("~y~Vagos haben Gewonnen",6000,5);
- SetPlayerHealth(playerid, 0);
- SetTimer("Finish",MAX_GM_TIME,true);
- }
- }
- public Wetter()
- {
- DasWetter[0] = WetterRandomLS[random(sizeof(WetterRandomLS))];
- DasWetter[1] = WetterRandomSF[random(sizeof(WetterRandomSF))];
- DasWetter[2] = WetterRandomLV[random(sizeof(WetterRandomLV))];
- }
- public SetWetter()
- {
- new Float:xx, Float:yy, Float:zz;
- for(new i=0; i< GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, xx, yy, zz);
- if((xx > -992.5172 && xx < 4000.0000) && (yy < 528.0000 && yy > -4000.0000)) //Los Santos
- {
- SetPlayerWeather(i, DasWetter[0]);
- }
- if((xx > -4000.0000 && xx< -992.5172) && (yy < 4000.0000 && yy > -4000.0000)) //San Fierro
- {
- SetPlayerWeather(i, DasWetter[1]);
- }
- if((xx > -992.5172 && xx< 4000.0000) && (yy < 4000.0000 && yy > 528.0000)) //Las Venturas
- {
- SetPlayerWeather(i, DasWetter[2]);
- }
- }
- }
- return 1;
- }
- public Finish()
- {
- SendRconCommand("gmx");
- return 1;
- }
- #if defined FILTERSCRIPT
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement