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 MAX_CPS 500 //Change it if you need more or less
- #define TEAM_Latino 1
- #define TEAM_Souviet 2
- #define TEAM_Arabian 3
- #define TEAM_USA 4
- #define TEAM_Europian 5
- #define TEAM_Japan 6
- #define TEAM_Taliban 7
- #define TEAM_Latino_COLOR 0x00F3FFAF
- #define TEAM_Souviet_COLOR 0xCA0000FF
- #define TEAM_Arabian_COLOR 0xD70000FF
- #define TEAM_USA_COLOR 0x1400C3FF
- #define TEAM_Europian_COLOR 0x005E0089
- #define TEAM_Japan_COLOR 0xFAFAFFFF
- #define TEAM_Taliban_COLOR 0xFFFFFFFF
- #define TEAM_Admin_COLOR 0xFF00F5FF
- #define COLOR_GREEN 0x33AA33AA
- new gTeam[MAX_PLAYERS];
- enum Info //CP ENUM
- {
- Float:CPX, //Xpos
- Float:CPY, //Ypos
- Float:CPZ, //Zpos
- Float:Size, //Size of the CP
- Float:Viewdist //Viewdistance
- };
- new CPID = -1; //CPID
- new PlayerCP[MAX_PLAYERS] = -1; //PlayerCheckpoints (Only one can be active at once).
- new CPinfo[MAX_CPS][Info]; //CPINFO
- new CPActive[MAX_PLAYERS][MAX_CPS]; //CPActive for player
- new CPDisabled[MAX_CPS]; //For disabling checkpoints
- new Hospital,SnakForme,GS,NearGs,DareHdaKhodare,DesertAirport,Area51,NearUsa,Motel,NearTaliban,ChikenResteaurant,Mercyonary,GS2,GreenPalms,StationStagSan;
- new Stationje,Ship,RadareHdaKhodare,HdaLatino,MoraEurop,HdaArabeBhare,Hafra;
- stock CreateCheckpoint(playerid, Float:cpX, Float:cpY, Float:cpZ, Float:cpSize, Float:viewdist = 35.0)
- {
- CPID ++; //CPID
- CPinfo[CPID][CPX] = cpX; //CPX Pos
- CPinfo[CPID][CPY] = cpY; //CPY Pos
- CPinfo[CPID][CPZ] = cpZ; //CPZ Pos
- CPinfo[CPID][Size] = cpSize; //Checkpoint Size
- CPinfo[CPID][Viewdist] = viewdist; //View distance
- if(playerid != -1)
- {
- CPActive[playerid][CPID] ++; //Makes the player able to view that checkpoint
- }
- if(playerid == -1)
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- CPActive[i][CPID] ++;
- }
- }
- return CPID;
- }
- new CPS1,CPS2,CPS3,CPS4,CPS5,CPS6,CPS7,CPS8,CPS9,CPS10,CPS11,CPS12,CPS13,CPS14,CPS15,CPS16,CPS17,CPS18,CPS19,CPS20;
- public OnGameModeInit()
- {
- Hospital = GangZoneCreate(980.9415,945.9079,1167.788,1132.754);
- SnakForme = GangZoneCreate(-70.06725, 2300.542, 11.67788, 2382.287);
- GS = GangZoneCreate(595.5717, 1669.936, 665.6389, 1763.359);
- NearGs = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- DareHdaKhodare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- DesertAirport = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Area51 = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- NearUsa = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Motel = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- NearTaliban = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- ChikenResteaurant = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Mercyonary = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- GS2 = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- GreenPalms = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- StationStagSan = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Stationje = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Ship = GangZoneCreate(-1494.768, 1424.701, -1342.956, 1529.802);
- RadareHdaKhodare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- HdaLatino = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- MoraEurop = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- HdaArabeBhare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- Hafra = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
- print("Starting timer...");
- SetTimer("message", 30000, false); // Set a timer of 1000 miliseconds (1 second)
- UsePlayerPedAnims();
- AddPlayerClass(108,1091.8289,1892.5746,10.8203,181.3648,0,0,0,0,0,0); //Latino (0)
- AddPlayerClass(206,-570.2114,400.6104,3.2266,181.0366,0,0,0,0,0,0); //Souviet (1)
- AddPlayerClass(179,-828.5663,1589.5376,27.0546,133.1694,0,0,0,0,0,0); //Arabian(2)
- AddPlayerClass(287,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //USA (3)
- AddPlayerClass(285,-148.1873,1142.0114,19.7422,16.0408,0,0,0,0,0,0); //Europian(4)
- AddPlayerClass(188,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Japan (5).
- AddPlayerClass(163,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Taliban(6)
- AddPlayerClass(217,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Taliban(6)
- CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0); //hospital
- CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0);
- CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0);
- CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0); //dare hda khodare
- CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0);
- CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0);
- CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0); // li hda G.s
- CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0);
- CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0);
- CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0); //G.S
- CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0);
- CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0);
- CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0); // desert airport
- CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0);
- CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0);
- CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0); //// snake form
- CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0);
- CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0);
- CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0); // li hda usa
- CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0);
- CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0);
- CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0); // motel
- CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0);
- CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0);
- CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0); // gda taliban
- CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0);
- CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0);
- CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0); // G.S 2
- CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0);
- CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0);
- CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0); // Chiken resteaurant
- CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0);
- CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0);
- CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0); // Dhip
- CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0);
- CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0);
- CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0); // Mercyonary
- CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0);
- CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0);
- CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0); // Staqtion dyal san stage
- CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0);
- CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0);
- CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0); // Station 2
- CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0);
- CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0);
- CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0);
- CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0);
- CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0); // green palms
- CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0);
- CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0);
- CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0); // radare (hda khodare)
- SetTimer("Stream", 300, true);
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- return 1;
- }
- forward Stream();
- public Stream()
- {
- for(new i; i < MAX_PLAYERS; i ++) //Loops through 500 players
- {
- if(IsPlayerConnected(i)) //Brings the 500 players down to the online ones
- {
- PlayerCP[i] = -1;
- for(new j; j < CPID + 1; j ++) //Loops through all CP's
- {
- if(CPDisabled[j] == 0) //Checks if the CP is disabled.
- {
- if(IsPlayerInRangeOfPoint(i, CPinfo[j][Viewdist], CPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ]) && CPActive[i][j] == 1) //Is the player in range of a CP
- {
- SetPlayerCheckpoint(i, CPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ], CPinfo[j][Size]);//Sets the player checkpoint
- PlayerCP[i] = j; //Sets the player checkpoint to that in the variable.
- printf("PCP:%d", j);
- }
- }
- }
- if(PlayerCP[i] == -1) //If there is no CP close enough
- {
- print("NAHBRO");
- PlayerCP[i] = -1; //PlayerCP isn't anything
- DisablePlayerCheckpoint(i); //Disable any checkpoint visible.
- continue;
- }
- }
- }
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
- SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
- SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
- SetPlayerTeamFromClass(playerid, classid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- GangZoneShowForPlayer(playerid, Hospital, 0x00000096);
- GangZoneShowForPlayer(playerid, SnakForme, 0x00000096);
- GangZoneShowForPlayer(playerid, GS, 0x00000096);
- GangZoneShowForPlayer(playerid, NearGs, 0x00000096);
- GangZoneShowForPlayer(playerid, DareHdaKhodare, 0x00000096);
- GangZoneShowForPlayer(playerid, DesertAirport, 0x00000096);
- GangZoneShowForPlayer(playerid, Area51, 0x00000096);
- GangZoneShowForPlayer(playerid, NearUsa, 0x00000096);
- GangZoneShowForPlayer(playerid, Motel, 0x00000096);
- GangZoneShowForPlayer(playerid, NearTaliban, 0x00000096);
- GangZoneShowForPlayer(playerid, ChikenResteaurant, 0x00000096);
- GangZoneShowForPlayer(playerid, Mercyonary, 0x00000096);
- GangZoneShowForPlayer(playerid, GS2, 0x00000096);
- GangZoneShowForPlayer(playerid, GreenPalms, 0x00000096);
- GangZoneShowForPlayer(playerid, StationStagSan, 0x00000096);
- GangZoneShowForPlayer(playerid, Stationje, 0x00000096);
- GangZoneShowForPlayer(playerid, RadareHdaKhodare, 0x00000096);
- GangZoneShowForPlayer(playerid, Ship, 0x00000096);
- GangZoneShowForPlayer(playerid, HdaLatino, 0x00000096);
- GangZoneShowForPlayer(playerid, MoraEurop, 0x00000096);
- GangZoneShowForPlayer(playerid, HdaArabeBhare, 0x00000096);
- GangZoneShowForPlayer(playerid, Hafra, 0x00000096);
- SetPlayerToTeamColor(playerid);
- return 1;
- }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if (classid == 0)
- {
- gTeam[playerid] = TEAM_Latino;
- }
- else if (classid == 1)
- {
- gTeam[playerid] = TEAM_Souviet;
- }
- else if (classid == 2)
- {
- gTeam[playerid] = TEAM_Arabian;
- }
- else if (classid == 3)
- {
- gTeam[playerid] = TEAM_USA;
- }
- else if (classid == 4)
- {
- gTeam[playerid] = TEAM_Europian;
- }
- else if (classid == 5)
- {
- gTeam[playerid] = TEAM_Japan;
- }
- else if (classid == 6)
- {
- gTeam[playerid] = TEAM_Taliban;
- }
- }
- SetPlayerToTeamColor(playerid)
- {
- if (gTeam[playerid] == TEAM_Latino)
- {
- SetPlayerColor(playerid, TEAM_Latino_COLOR);
- }
- else if (gTeam[playerid] == TEAM_Souviet)
- {
- SetPlayerColor(playerid, TEAM_Souviet_COLOR);
- }
- else if (gTeam[playerid] == TEAM_Arabian)
- {
- SetPlayerColor(playerid, TEAM_Arabian_COLOR);
- }
- else if (gTeam[playerid] == TEAM_USA)
- {
- SetPlayerColor(playerid, TEAM_USA_COLOR);
- }
- else if (gTeam[playerid] == TEAM_Europian)
- {
- SetPlayerColor(playerid, TEAM_Europian_COLOR);
- }
- else if (gTeam[playerid] == TEAM_Japan)
- {
- SetPlayerColor(playerid, TEAM_Japan_COLOR);
- }
- else if (gTeam[playerid] == TEAM_Taliban)
- {
- SetPlayerColor(playerid, TEAM_Taliban_COLOR);
- }
- 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)
- {
- if(PlayerCP[playerid] != -1) return OnPlayerEnterStreamedCheckpoint(playerid, PlayerCP[playerid]);
- return 1;
- }
- stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
- {
- if(CPiD == CPS1)
- {
- GameTextForPlayer(playerid, "Stay her to capture hospital!", 3000, 3);
- SetTimerEx("Stream",20000,false,"i",playerid);
- if(gTeam[playerid]==TEAM_Latino)
- {
- GangZoneShowForAll(Hospital,0x00F3FFAF);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- GiveTeamScore(gTeam[playerid]=TEAM_Latino, 1);
- SendTeamMessage(COLOR_GREEN, "You received 1 Score For a Capture!",TEAM_Latino);
- }
- if(gTeam[playerid]==TEAM_USA)
- {
- GangZoneShowForAll(Hospital,0x1400C3FF);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- }
- if(gTeam[playerid]==TEAM_Arabian)
- {
- GangZoneShowForAll(Hospital,0xD70000FF);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- }
- if(gTeam[playerid]==TEAM_Japan)
- {
- GangZoneShowForAll(Hospital,0xFAFAFFFF);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- }
- if(gTeam[playerid]==TEAM_Souviet)
- {
- GangZoneShowForAll(Hospital,0xCA0000FF);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- }
- if(gTeam[playerid]==TEAM_Europian)
- {
- GangZoneShowForAll(Hospital,0x005E0089);
- SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
- GivePlayerMoney(playerid,6000);
- SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
- }
- }
- if(CPiD == CPS2)
- {
- GameTextForPlayer(playerid, "Dare hda khodare!", 3000, 3);
- }
- if(CPiD == CPS3)
- {
- GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
- }
- if(CPiD == CPS4)
- {
- GameTextForPlayer(playerid, "G.S!", 3000, 3);
- }
- if(CPiD == CPS5)
- {
- GameTextForPlayer(playerid, "Desert Airport", 3000, 3);
- }
- if(CPiD == CPS6)
- {
- GameTextForPlayer(playerid, "Snak Forme", 3000, 3);
- }
- if(CPiD == CPS7)
- {
- GameTextForPlayer(playerid, "Li hda USA", 3000, 3);
- }
- if(CPiD == CPS8)
- {
- GameTextForPlayer(playerid, "Motel", 3000, 3);
- }
- if(CPiD == CPS9)
- {
- GameTextForPlayer(playerid, "Hda taliban", 3000, 3);
- }
- if(CPiD == CPS10)
- {
- GameTextForPlayer(playerid, "G.S 2!", 3000, 3);
- }
- if(CPiD == CPS11)
- {
- GameTextForPlayer(playerid, "Checken restaurant", 3000, 3);
- }
- if(CPiD == CPS12)
- {
- GameTextForPlayer(playerid, "Ship", 3000, 3);
- }
- if(CPiD == CPS13)
- {
- GameTextForPlayer(playerid, "Mercyonary", 3000, 3);
- }
- if(CPiD == CPS14)
- {
- GameTextForPlayer(playerid, "Staion dyal sane stage", 3000, 3);
- }
- if(CPiD == CPS15)
- {
- GameTextForPlayer(playerid, "Station2", 3000, 3);
- }
- if(CPiD == CPS16)
- {
- GameTextForPlayer(playerid, "green palms", 3000, 3);
- }
- if(CPiD == CPS17)
- {
- GameTextForPlayer(playerid, "radare (hda khodare)", 3000, 3);
- }
- if(CPiD == CPS18)
- {
- GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
- }
- if(CPiD == CPS19)
- {
- GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
- }
- if(CPiD == CPS20)
- {
- GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
- }
- return 1;
- }
- stock DestroyCheckpoint(CPiD) //Destory's a checkpoint
- {
- CPDisabled[CPiD] = 1;
- for(new i; i< MAX_PLAYERS; i++)
- {
- if(PlayerCP[i] == CPiD)
- {
- DisablePlayerCheckpoint(i);
- }
- }
- }
- stock TogglePlayerCheckpoint(playerid, CPiD, toggled) //Toggles a checkpoint for a player 0 = Not active, 1 = active :)
- {
- CPActive[playerid][CPiD] = toggled;
- }
- 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;
- }
- stock GiveTeamScore(teamid, score) // Try this code
- {
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(gTeam[i] == teamid)
- {
- SetPlayerScore(i, GetPlayerScore(i) + score);
- }
- }
- }
- stock SendTeamMessage(color, string[],team)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == team)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment