- #include <a_samp>
- #define COLOR_ROJO 0xAA3333AA //colores mensajes
- #define COLOR_AMARILLO 0xFFFF00AA
- forward getCheckpointType2(playerID);
- forward checkpointUpdate2();
- forward isPlayerInArea2(playerID, Float:data[4]);
- new playerCheckpoint2[MAX_PLAYERS];
- #define CP_DM 0
- #define CP_DMV 1
- #define CP_PBUS1 2
- #define CP_PBUS2 3
- #define CP_PBUS3 4
- #define CP_PBUS4 5
- #define MAX_POINTS2 6
- new Float:checkCoords2[MAX_POINTS2][4] = {
- {2086.2224,1874.6622,2286.2224,2074.6622}, //dm
- {146.2369,25.2268,346.2369,225.2268}, //volver del dm
- {1979.9790,1533.6473,2179.9790,1733.6473}, //paradabus avenida
- {1630.0044,1380.0146,1830.0044,1580.0146}, //paradabus aeropuerto
- {2059.3940,1893.6606,2259.3940,2093.6606}, //paradabus dm
- {1479.2019,1482.9419,1679.2019,1682.9419} //paradabus
- };
- new Float:checkpoints2[MAX_POINTS2][3] = {
- {2186.2224,1974.6622,10.8203}, //DM
- {246.2369,125.2268,1003.2188}, //Volver del dm
- {2079.9790,1633.6473,10.8203}, //paradabus avenida
- {1730.0044,1480.0146,10.8128}, //paradabus aeropuerto
- {2159.3940,1993.6606,10.8203}, //paradabus dm
- {1579.2019,1582.9419,10.8203} //paradabus
- };
- new checkpointType2[MAX_POINTS2] = {
- CP_DM,
- CP_DMV,
- CP_PBUS1,
- CP_PBUS2,
- CP_PBUS3,
- CP_PBUS4
- };
- public getCheckpointType2(playerID)
- {
- return checkpointType2[playerCheckpoint2[playerID]];
- }
- public isPlayerInArea2(playerID, Float:data[4])
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerID, X, Y, Z);
- if(X >= data[0] && X <data>= data[1] && Y <= data[3]) {
- return 1;
- }
- return 0;
- }
- public checkpointUpdate2()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) {
- for(new j=0; j < MAX_POINTS2; j++) {
- if(isPlayerInArea2(i, checkCoords2[j])) {
- if(playerCheckpoint2[i]!=j) {
- DisablePlayerCheckpoint(i);
- SetPlayerCheckpoint(i, checkpoints2[j][0],checkpoints2[j][1],checkpoints2[j][2], 2);
- playerCheckpoint2[i] = j;
- }
- } else {
- if(playerCheckpoint2[i]==j) {
- DisablePlayerCheckpoint(i);
- playerCheckpoint2[i] = 999;
- }
- }
- }
- }
- }
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by GuiLLe");
- print("--------------------------------------\n");
- SetTimer("checkpointUpdate", 1100, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- main()
- {
- }
- public OnPlayerConnect(playerid)
- {
- playerCheckpoint2[playerid] = 999;
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- switch (getCheckpointType2(playerid)) {
- case CP_DM: {
- SendClientMessage(playerid, COLOR_AMARILLO, "Para entrar al DeathMatch utiliza /dm");
- }
- }
- return 1;
- }