Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #define TEAM_YELLOW 1 //Team one
- #define TEAM_BLUE 2 //Team two
- new gTeam[MAX_PLAYERS];//For defining teams
- new Minutes =2;//For defining game minutes
- new Seconds =59;//For defining game Seconds
- new CurrentMap;//For defining maps number
- new Text:Textdraw0;//Tjis is the textdraw for timeleft
- #define COL_YELLOW 0xFFFF00C8
- #define COL_BLUE 0x0080FFC8
- forward NewMap(playerid);
- forward NewRound(playerid);
- forward GameTime();
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- //map system
- CurrentMap = 0;
- SetTimer("NewMap",180000,1); // 2 min
- SetTimer("GameTime",1000,1);
- //Text DRaw of Map changing system
- Textdraw0 = TextDrawCreate(227.000000, 3.000000, "_");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 1);
- TextDrawLetterSize(Textdraw0, 0.509999, 1.999999);
- TextDrawColor(Textdraw0, -1);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- return 1;
- }
- public OnGameModeExit()
- {
- TextDrawDestroy(Textdraw0);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid,Textdraw0);
- //maps
- switch(CurrentMap)
- {
- case 0:// Map 1
- {
- if(gTeam[playerid] == TEAM_YELLOW) {//Team 1 functions
- SetPlayerColor(playerid,COL_YELLOW);
- SetPlayerPos(playerid, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
- SetPlayerFacingAngle(playerid, 186.7970);//Set facing angle of players for map 1
- SetPlayerInterior(playerid,0);
- }
- if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
- SetPlayerColor(playerid,COL_BLUE);
- SetPlayerPos(playerid, 234.8519,-1855.6536,8.2832);//Set the postion for the players for map 1
- SetPlayerFacingAngle(playerid, 351.4334);//Set facing angle of players for map 1
- SetPlayerInterior(playerid,0);
- }
- }
- case 1:// Map 2
- {
- if(gTeam[playerid] == TEAM_YELLOW) {//Team 1 functions
- SetPlayerColor(playerid,COL_YELLOW);
- SetPlayerPos(playerid, 2761.5713,1218.4265,26.8340);//Set the postion for the players for map 1
- SetPlayerFacingAngle(playerid, 224.2976);//Set facing angle of players for map 1
- SetPlayerInterior(playerid,0);
- }
- if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
- SetPlayerColor(playerid,COL_BLUE);
- SetPlayerPos(playerid, 2825.0347,1106.3010,21.6618);//Set the postion for the players for map 1
- SetPlayerFacingAngle(playerid, 9.3883);//Set facing angle of players for map 1
- SetPlayerInterior(playerid,0);
- }
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- 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)
- {
- 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;
- }
- public GameTime()
- {
- if(Seconds || Minutes) {
- Seconds--;
- if(Seconds <= -1) {
- Minutes--;
- Seconds=59;
- }
- new TimeString[128];
- format(TimeString,sizeof(TimeString),"~g~Timeleft ~w~: %02d:%02d",Minutes,Seconds);
- TextDrawSetString(Textdraw0,TimeString);
- }
- return 1;
- }
- public NewMap(playerid) {
- CurrentMap++;
- GameTextForAll("~w~Server:~r~ Loading Next map",5000,4);
- SetTimer("NewRound",5000,0);
- return 1;
- }
- public NewRound(playerid) {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- SpawnPlayer(i);
- switch(CurrentMap)
- {
- case 0://Map 1
- {
- if(gTeam[playerid] == TEAM_YELLOW)
- {//Team 1 functions
- SetPlayerColor(i,COL_YELLOW);
- SetPlayerPos(i, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
- SetPlayerFacingAngle(i, 186.7970);
- SetPlayerInterior(i,0);
- Minutes =2;// game minutes
- Seconds =49;// game seconds
- }
- if(gTeam[playerid] == TEAM_YELLOW)
- {//Team 1 functions
- SetPlayerColor(i,COL_YELLOW);
- SetPlayerPos(i, 236.2544,-1802.1465,28.1407);//Set the postion for the players for map 1
- SetPlayerFacingAngle(i, 186.7970);
- SetPlayerInterior(i,0);// seting all interior
- Minutes =2;// game minutes
- Seconds =49;// game seconds
- }
- }
- case 1://Map 2
- {
- if(gTeam[playerid] == TEAM_YELLOW)
- {//Team 1 functions
- SetPlayerColor(i,COL_YELLOW);
- SetPlayerPos(i, 2761.5713,1218.4265,26.8340);//Set the postion for the players for map 1
- SetPlayerFacingAngle(i, 224.2976);//Set facing angle of players for map 1
- SetPlayerInterior(i,0);
- }
- if(gTeam[playerid] == TEAM_BLUE) {//Team 2 functin
- SetPlayerColor(playerid,COL_BLUE);
- SetPlayerPos(i, 2825.0347,1106.3010,21.6618);//Set the postion for the players for map 1
- SetPlayerFacingAngle(i, 9.3883);//Set facing angle of players for map 1
- SetPlayerInterior(i,0);
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment