31.12.2014, 15:46
(
Last edited by Irektyou11; 14/01/2015 at 11:51 PM.
Reason: Updated.
)
Southside Deathmatch Script
Hey guys i'm releasing my first game for basic deathmatch script.
Screenshots:Hey guys i'm releasing my first game for basic deathmatch script.
Code:
Commands: /betray - needs to be fixed betrays merceneary fella's and becomes a bounty mercenary /rpg - for tank gives him or her a unlimited rpg! kill him or her will be a result with +5XP and 5000$ /heal - for doctor - heal's himself - you can add it to be like heal others. /armour - for doctor - armours himself. /level [1/2/3/4/5] - admin commands ---Features--- Login Register Admin System Custom Commands Vehicles VIP system ---What needs to be done--- Betray needs to be fixed Commands still need to be added That's all! Do not delete the credits without permission! or re-release without permission! https://www.mediafire.com/?esccj34ahj9cfva // Includes #include <a_samp> #include <zcmd> // Pragams #pragma tabsize 0 //Colors #define TEAM_AZTECAS_COLOR 0x01FCFFC8 #define COLOR_WHITE 0xFFFFFFFF #define COLOR_FADE1 0xE6E6E6E6 #define COLOR_PM1 0xA65FC7FF #define COLOR_PM2 0xD35FC7FF #define COLOR_FADE2 0xC8C8C8C8 #define COLOR_FADE3 0xAAAAAAAA #define COLOR_FADE4 0x8C8C8C8C #define COLOR_FADE5 0x6E6E6E6E #define COLOR_OOC 0xE0FFFFFF #define COLOR_GREY 0xAFAFAFFF #define COLOR_LIGHTGREEN 0xADFF2FFF #define COLOR_LIGHTRED 0xFF6347FF #define COLOR_DARKRED 0xAA3333FF #define COLOR_RED 0xFF0606FF #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_GREEN 0x33AA33FF #define COLOR_YELLOW 0xFFFF00FF #define COLOR_PURPLE 0xC2A2DAFF #define COLOR_ORANGE 0xFF9900FF #define COLOR_REPORT 0xFFFF91FF #define COLOR_RADIO 0x8D8DFFFF #define COLOR_DEPTRADIO 0xFFD700FF #define COLOR_BLUE 0x2641FEFF #define COLOR_MEDIC 0xFF8282FF #define COLOR_N 0xFF9900FF #define COLOR_LIME 0x00FF00FF #define COLOR_NEWS 0x049C7100 #define COLOR_CYAN 0x01FCFFFF #define COLOR_VIP 0xC93CCEFF #define COLOR_PORTABLERADIO 0x6DFB6DFF #define COLOR_HUMAN 0x33CCFF44 #define COLOR_ZOMBIE 0x9ACD3244 #define COLOR_ADUTY 0xFF0000AA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_MAGENTA 0xFF00FFFF #define COLOR_NAVY 0x000080AA #define COLOR_AQUA 0xFF000000 #define COLOR_CRIMSON 0xDC143CAA #define COLOR_FLBLUE 0x6495EDAA #define COLOR_BISQUE 0xFFE4C4AA #define COLOR_BLACK 0x000000AA #define COLOR_CHARTREUSE 0x7FFF00AA #define COLOR_BROWN 0XA52A2AAA #define COLOR_CORAL 0xFF7F50AA #define COLOR_GOLD 0xB8860BAA #define COLOR_GREENYELLOW 0xADFF2FAA #define COLOR_INDIGO 0x4B00B0AA #define COLOR_IVORY 0xFFFF82AA #define COLOR_LAWNGREEN 0x7CFC00AA #define COLOR_SEAGREEN 0x20B2AAAA #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime #define COLOR_MIDNIGHTBLUE 0X191970AA #define COLOR_MAROON 0x800000AA #define COLOR_OLIVE 0x808000AA #define COLOR_ORANGERED 0xFF4500AA #define COLOR_PINK 0xFFC0CBAA // - Light light pink #define COLOR_SPRINGGREEN 0x00FF7FAA #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green #define COLOR_MEDIUMAQUA 0x83BFBFAA #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^ new betrayed[MAX_PLAYERS]; main() { print("\n----------------------------------"); print(" Eastwood Free-For-All Deathmatch by Kyle!"); print("----------------------------------\n"); } public OnGameModeInit() { // Don't use these lines if it's a filterscript UsePlayerPedAnims(); DisableInteriorEnterExits(); SetGameModeText("E-FDM"); //Grove Street! AddPlayerClassEx(1,106,2495.3745,-1687.0148,13.5152,359.9212,0,0,0,0,0,0); // Class location AddPlayerClassEx(1,105,2495.3745,-1687.0148,13.5152,359.9212,0,0,0,0,0,0); // Class location //Bikers! AddPlayerClassEx(2,23,1489.0370,-1724.1262,6.6878,165.3887,0,0,0,0,0,0); // Class location AddPlayerClassEx(2,254,1489.0370,-1724.1262,6.6878,165.3887,0,0,0,0,0,0); // Class location //Mercenary AddPlayerClassEx(3,239,1689.9438,-1495.1478,13.5469,258.4496,0,0,0,0,0,0); // Class location AddPlayerClassEx(3,230,1689.9438,-1495.1478,13.5469,258.4496,0,0,0,0,0,0); // Class location AddPlayerClassEx(3,137,1689.9438,-1495.1478,13.5469,258.4496,0,0,0,0,0,0); // Class location //Doctor AddPlayerClassEx(4,70,1775.0406,-1706.3138,13.5234,6.7189,0,0,0,0,0,0); // Class location //Army AddPlayerClassEx(5,287,1765.7401,-1363.5620,15.7578,271.0064,0,0,0,0,0,0); // Class location //Tank AddPlayerClassEx(6,29,1797.9713,-1579.0109,14.0922,280.5515,0,0,0,0,0,0); // Class location // Vehicles AddStaticVehicle(492,1817.4697,-1581.5004,13.2269,173.4193,3,1); AddStaticVehicle(492,1818.9746,-1575.2432,13.2313,164.9421,3,1); AddStaticVehicle(492,1821.2686,-1566.7173,13.2319,164.9421,3,1); AddStaticVehicle(492,1823.3209,-1559.0880,13.2521,164.9408,3,1); AddStaticVehicle(492,1824.7377,-1553.8213,13.2656,164.9389,3,1); AddStaticVehicle(522,1806.5599,-1580.7460,13.0572,127.5021,3,1); AddStaticVehicle(522,1807.7604,-1582.3098,13.1071,127.4854,3,1); AddStaticVehicle(463,1491.3210,-1737.5051,6.1868,346.3082,3,1); AddStaticVehicle(463,1493.3945,-1738.1047,6.1583,344.5477,3,1); AddStaticVehicle(463,1495.2312,-1738.4738,6.1181,344.9170,3,1); AddStaticVehicle(463,1497.3140,-1738.7238,6.0848,349.8004,3,1); AddStaticVehicle(463,1500.4513,-1739.6130,6.0233,343.4891,3,1); AddStaticVehicle(459,1780.1024,-1690.2214,13.4761,179.9940,1,0); AddStaticVehicle(459,1768.7716,-1689.9431,13.4815,178.7320,1,0); AddStaticVehicle(459,1796.9307,-1689.8883,13.5701,178.0579,1,0); AddStaticVehicle(459,1790.4698,-1689.7642,13.4856,178.0430,1,0); AddStaticVehicle(459,1786.9297,-1690.0573,13.4660,178.1342,1,0); AddStaticVehicle(470,1772.3655,-1354.2969,15.8080,270.6473,86,56); // Patriot 1 AddStaticVehicle(470,1772.5167,-1346.6559,15.8283,270.5258,86,0); // Patriot 2 AddStaticVehicle(470,1767.2581,-1346.7111,15.7615,270.6152,86,0); // Patriot 3 AddStaticVehicle(470,1765.4075,-1354.4756,15.7655,270.6152,86,0); // Patriot 4 AddStaticVehicle(470,1758.7306,-1354.5471,15.8079,270.6152,86,0); // Patriot 5 AddStaticVehicle(470,1751.2620,-1354.6272,15.8554,270.6152,86,0); // Patriot 6 AddStaticVehicle(470,1749.6797,-1350.5905,15.8803,352.3178,86,0); // Patriot 7 AddStaticVehicle(470,1755.8892,-1345.0344,15.8802,266.4621,86,0); // Patriot 8 AddStaticVehicle(475,2501.5054,-1682.8708,13.2489,298.7322,16,1); // Sabre one green AddStaticVehicle(475,2505.2571,-1680.1324,13.3893,322.1678,16,1); // Sabre two green AddStaticVehicle(475,2507.8892,-1676.6162,13.3910,329.7001,16,1); // Sabre three green AddStaticVehicle(475,2509.4287,-1671.9659,13.3911,350.7399,16,1); // Sabre four green AddStaticVehicle(475,2509.6770,-1668.2620,13.4035,6.8720,16,1); // Sabre five green AddStaticVehicle(411,1702.8942,-1472.2764,13.2999,180.4516,3,1); // merc's infernus one AddStaticVehicle(411,1706.3654,-1483.4305,13.2813,180.4516,3,1); // merc's infernus two AddStaticVehicle(411,1706.4692,-1496.6235,13.2687,180.4516,3,1); // merc's infernus three AddStaticVehicle(411,1706.5389,-1505.4602,13.2602,180.4516,3,1); // merc's infernus fours AddStaticVehicle(411,1706.5999,-1513.1953,13.2528,180.4516,3,1); // merc's infernus five AddStaticVehicle(411,1706.6603,-1520.8486,13.2455,180.4516,3,1); // merc's infernus six AddStaticVehicle(411,1706.7318,-1529.9510,13.2368,180.4516,3,1); // merc's infernus seven //pickups return 1; } public OnGameModeExit() { return 1; } public OnPlayerRequestClass(playerid, classid) { if(classid == 0) { GameTextForPlayer(playerid, "~g~Grove Street", 4000, 3); } else if(classid == 1) { GameTextForPlayer(playerid, "~g~Grove Street", 4000, 3); } else if(classid == 2) { GameTextForPlayer(playerid, "~b~Bikers!", 4000, 3); } else if(classid == 3) { GameTextForPlayer(playerid, "~b~Bikers!", 4000, 3); } else if(classid == 4) { GameTextForPlayer(playerid, "~r~Mercenary!", 4000, 3); } else if(classid == 5) { GameTextForPlayer(playerid, "~r~Mercenary!", 4000, 3); } else if(classid == 6) { GameTextForPlayer(playerid, "~r~Mercenary!", 4000, 3); } else if(classid == 7) { GameTextForPlayer(playerid, "~y~Doctor", 4000, 3); } else if(classid == 8) { GameTextForPlayer(playerid, "Army", 4000, 3); } else if(classid == 9) { GameTextForPlayer(playerid, "~p~Tank", 4000, 3); { } } SetPlayerPos(playerid, 2495.3745,-1687.0148,13.5152); SetPlayerCameraPos(playerid, 2495.0925,-1677.1157,13.3375); SetPlayerCameraLookAt(playerid, 2495.3745,-1687.0148,13.5152); SetPlayerFacingAngle(playerid, 359.9212); return 1; } public OnPlayerConnect(playerid) { betrayed[playerid] = 0; SendClientMessage(playerid, COLOR_LIGHTBLUE, "Welcome To E-FDM Please read the rules before you play else it must result into a ban"); SendClientMessage(playerid, COLOR_RED, "Please relog after registering to avoid being bugged"); return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { if(GetPlayerTeam(playerid) == 1) { SendClientMessage(playerid, COLOR_LIME, "You're on Team Grove Street!."); GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999); GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 99999); GivePlayerWeapon(playerid, WEAPON_AK47, 99999); SetPlayerArmour(playerid, 30); SetPlayerColor(playerid, COLOR_LIME); } else if(GetPlayerTeam(playerid) == 2) { GivePlayerWeapon(playerid, WEAPON_COLT45, 99999); GivePlayerWeapon(playerid, WEAPON_SNIPER, 99999); GivePlayerWeapon(playerid, WEAPON_M4, 99999); SendClientMessage(playerid, COLOR_BLUE, "You're on Team Bikers!."); SetPlayerArmour(playerid, 50); SetPlayerColor(playerid, COLOR_BLUE); } else if(GetPlayerTeam(playerid) == 3) { SendClientMessage(playerid, COLOR_RED, "You're on Team Mercenary."); GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999); GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 99999); GivePlayerWeapon(playerid, WEAPON_SNIPER, 99999); SetPlayerColor(playerid, COLOR_RED); } else if(GetPlayerTeam(playerid) == 4) { SendClientMessage(playerid, COLOR_YELLOW, "You're on Team Doctor."); GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999); GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 99999); GivePlayerWeapon(playerid, WEAPON_TEC9, 99999); SetPlayerArmour(playerid, 20); SetPlayerColor(playerid, COLOR_TOMATO); } else if(GetPlayerTeam(playerid) == 5) { SendClientMessage(playerid, COLOR_YELLOW, "You're on Team Army."); GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999); GivePlayerWeapon(playerid, WEAPON_M4, 99999); GivePlayerWeapon(playerid, WEAPON_RIFLE, 99999); SetPlayerArmour(playerid, 20); SetPlayerColor(playerid, COLOR_ORANGE); } else if(GetPlayerTeam(playerid) == 6) { if(GetPlayerScore(playerid) == 100) SendClientMessage(playerid, COLOR_YELLOW, "You've select the tank class! be aware not to kill yourself!"); SendClientMessage(playerid, COLOR_YELLOW, "Use /rpg to recevive a rpg as a tank!!"); SendClientMessageToAll(COLOR_RED, "Someone has selected the tank class! beware! trying to face him/her will be difficult!"); SendClientMessage(playerid, COLOR_YELLOW, "You're on Team Tank!."); GivePlayerWeapon(playerid, WEAPON_GRENADE, 99999); SetPlayerColor(playerid, COLOR_LIGHTRED); SetPlayerHealth(playerid, 50); } SendClientMessage(playerid, COLOR_GREEN, "You've been given a bunch of weapons! try and kill other teams to save your own turf!."); return 1; } public OnPlayerDeath(playerid, killerid, reason) { if(GetPlayerTeam(playerid) == 6) SendClientMessageToAll(COLOR_DARKRED, "TANK WARN: The Tank Has been defeated!!! the killer has been rewarded with 5+ score bonus aswell as 5000$"); SetPlayerScore(killerid, GetPlayerScore(killerid)+5); GivePlayerMoney(killerid, GetPlayerMoney(killerid)+5000); if(GetPlayerTeam(playerid) == 3) SendClientMessageToAll(COLOR_DARKRED, "The mercenary was killed! the bounty is over the killer has been rewarded with his 50000$ and 5XP"); SetPlayerScore(killerid, GetPlayerScore(killerid)+5); GivePlayerMoney(killerid, GetPlayerMoney(killerid)+50000); SetPlayerScore(killerid, GetPlayerScore(killerid)+1); SetPlayerScore(playerid, GetPlayerScore(playerid)-1); if(GetPlayerMoney(playerid) > 1000) { SendClientMessage(playerid, COLOR_RED, "You have died! you will lose 1000$ if you had 1000$!"); SendClientMessage(killerid, COLOR_RED, "You have recevived 1000$"); GivePlayerMoney(playerid, -1000); GivePlayerMoney(killerid, 1000); } return 1; } // Vehicles public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/heal", cmdtext, true, 10) == 0) { if(GetPlayerTeam(playerid) == 1) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 3) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 6) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); else if(GetPlayerTeam(playerid) == 4) { SetPlayerHealth(playerid, 100); SendClientMessage(playerid, -1, "You have healed yourself"); } return 1; } if (strcmp("/armour", cmdtext, true, 10) == 0) { if(GetPlayerTeam(playerid) == 1) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 3) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); if(GetPlayerTeam(playerid) == 6) return SendClientMessage(playerid, COLOR_RED, "You're not a doctor!"); else if(GetPlayerTeam(playerid) == 4) { SetPlayerArmour(playerid, 100); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have filled yourself with 100 armour."); } return 1; } if (strcmp("/rpg", cmdtext, true, 10) == 0) { if(GetPlayerTeam(playerid) == 1) return SendClientMessage(playerid, COLOR_RED, "You're not a tank!"); if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid, COLOR_RED, "You're not a tank!"); if(GetPlayerTeam(playerid) == 3) return SendClientMessage(playerid, COLOR_RED, "You're not a tank!"); if(GetPlayerTeam(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "You're not a tank!"); if(GetPlayerTeam(playerid) == 4) return SendClientMessage(playerid, COLOR_RED, "You're not a tank!"); else if(GetPlayerTeam(playerid) == 6) { GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 99999); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been given a rpg! with unlimited ammo! ."); SendClientMessageToAll(COLOR_DARKRED, "TANK WARN: A Tank Has Recevived a RPG trying to face him/her on front-lines may be a risk! be warned!"); } return 1; } if (strcmp("/kill", cmdtext, true, 10) == 0) { SendClientMessage(playerid, COLOR_RED, "You have killed yourself! you lose one point"); SetPlayerHealth(playerid, 0); return 1; } if (strcmp("/betray", cmdtext, true, 10) == 0) { if(GetPlayerTeam(playerid) == 1) return SendClientMessage(playerid, COLOR_RED, "You're not a mercenary!"); if(GetPlayerTeam(playerid) == 2) return SendClientMessage(playerid, COLOR_RED, "You're not a mercenary!"); if(GetPlayerTeam(playerid) == 4) return SendClientMessage(playerid, COLOR_RED, "You're not a mercenary!"); if(GetPlayerTeam(playerid) == 5) return SendClientMessage(playerid, COLOR_RED, "You're not a mercenary!"); if(GetPlayerTeam(playerid) == 6) return SendClientMessage(playerid, COLOR_RED, "You're not a mercenary!"); if(GetPlayerTeam(playerid) == 3) SetPlayerColor(playerid, COLOR_WHITE); if(betrayed[playerid] == 1) return SendClientMessage(playerid, COLOR_DARKRED, "You have already betrayed your friends! you are now an enemy!"); betrayed[playerid] = 1; SetPlayerScore(playerid, 150); SendClientMessageToAll(COLOR_MEDIUMMAGENTA, "A Mercenary has betrayed their fella's he/her has been marked as a white name! killing him or her will recevive 50000$ and 5+ XP"); SendClientMessage(playerid, COLOR_DARKRED, "You have now betrayed your friends!"); return 1; } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { SetCameraBehindPlayer(playerid); if(GetPlayerTeam(playerid) == 6 && GetPlayerScore(playerid) < 10000) { ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_RED, "***You must have above 9000 score to buy this class!***"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands for tank: /rpg [Give's you a rpg with unlimited ammo]"); return 1; } if(GetPlayerTeam(playerid) == 3 && GetPlayerScore(playerid) < 100000) { ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_RED, "***You must have above 90000 score to buy this class! it is the most benefital class!***"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands for mercenary: /betray [Betray your fella's and become a true mercenary!] /setbounty [Set a bounty on someone]"); return 1; } if(GetPlayerTeam(playerid) == 4 && GetPlayerScore(playerid) < 20000) { ForceClassSelection(playerid); SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_RED, "***You must have above 15000 score to buy this class!***"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands for medic: /heal [Heal's yourself] /armour [Armour's yourself]"); return 1; } return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 1; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } Do not remove the credits!---- or re-release without permission! If you get any errors contact me.