Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // |-----------------------------------------|
- // | |
- // | Military Operations |
- // | A Warzone RP Script |
- // | By Chris Bluman |
- // | http://theasylumhangout.com |
- // | |
- // |-----------------------------------------|
- #include <a_samp>
- #include <core>
- #include <float>
- #define SANG 0 // San Andreas National Guard
- #define APLF 1 // Andrean Public Liberation Front
- #define COLOR_GAME 0xFFFFFFFF
- #define COLOR_CHAT 0xCCFFCCAA
- #define COLOR_ADMIN 0x0000FFAA
- #define COLOR_COMMAND 0x800000AA
- #define COLOR_SANG 0x4CBB17AA
- #define COLOR_APLF 0x008080AA
- #define COLOR_BROWN 0x964B00AA
- #pragma unused SetPlayerToTeamColor
- new gTeam[MAX_PLAYERS];
- main()
- {
- print("\n------------------------");
- print("Military Operations v0.04");
- print("------------------------\n");
- }
- public OnGameModeInit()
- {
- SetGameModeText("CBCWAR v0.04");
- ShowPlayerMarkers(0);
- ShowNameTags(0);
- AddPlayerClass(287,-183.5194,1090.8673,19.7422,52.6484,0,0,0,0,0,0); // Revise Coords
- AddPlayerClass(285,-183.5194,1090.8673,19.7422,52.6484,0,0,0,0,0,0); // Revise Coords
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_GAME,"Welcome to Military Operations.");
- SendClientMessage(playerid,COLOR_GAME,"Military Operations is a warzone roleplay server.");
- SendClientMessage(playerid,COLOR_GAME,"Use {FF0000}/help {FFFFFF}and {FF0000}/commands {FFFFFF}for more help.");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/credits", true))
- {
- SendClientMessage(playerid,COLOR_GAME, "SERVER: Created by Chris Bluman with assistance from Brian Wright of The Asylum.");
- return 1;
- }
- if(strcmp(cmdtext, "/enter", true) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2,-179.8969,1087.9668,19.7422)) // Revise Coords
- {
- if(gTeam[playerid] == 1)
- {
- SetPlayerInterior(playerid, 11);
- SetPlayerPos(playerid, 501.980987,-69.150199,988.757812); // Revise Coords
- SendClientMessage(playerid, COLOR_SANG, "Welcome to the Barracks");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_BROWN, "This door is restricted to SANG.");
- return 1;
- }
- }
- }
- if(strcmp(cmdtext, "/exit", true) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2,501.980987,-69.150199,988.757812)) // Revise Coords
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -179.8969,1087.9668,19.7422); // Revise Coords
- return 1;
- }
- }
- return 0;
- }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if(classid == 0)
- {
- gTeam[playerid] = SANG;
- }
- if(classid == 1)
- {
- gTeam[playerid] = APLF;
- }
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerTeamFromClass(playerid, classid);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(gTeam[playerid] == SANG)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2497.2693,-1676.9578,13.3398); // Revise Coords
- return 1;
- }
- else if(gTeam[playerid] == APLF)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2497.2693,-1676.9578,13.3398); // Revise Coords
- return 1;
- }
- return 1;
- }
- SetPlayerToTeamColor(playerid)
- {
- if(gTeam[playerid] == SANG)
- {
- SetPlayerColor(playerid,COLOR_SANG);
- }
- if(gTeam[playerid] == APLF)
- {
- SetPlayerColor(playerid,COLOR_APLF);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement