Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*------------------------------------------------------------------------------
- Rmarkers Created by Killa[DGZ]
- ------------------------------------------------------------------------------*/
- #define FILTERSCRIPT
- #include <a_samp>
- #define GREY 0xAFAFAFAA
- #define RED 0xAA3333AA
- #if defined FILTERSCRIPT
- #define MAX_REDMARKERS 100
- #define MAX_FLASHMARKERS 100
- enum redSpot
- {
- Redmarker,
- Float:redmX,
- Float:redmY,
- Float:redmZ,
- rmObject,
- };
- new Markcord[MAX_REDMARKERS][redSpot];
- enum flashSpot
- {
- Flashmarker,
- Float:flamX,
- Float:flamY,
- Float:flamZ,
- flObject,
- };
- new Markcords[MAX_FLASHMARKERS][flashSpot];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" RMarkers By Killa[DGZ] ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, RED,"* RMarkers, Type: /markerhelp for more info *");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp(cmdtext,"/markerhelp",true) == 0)
- {
- SendClientMessage(playerid, RED," * Red Markers *");
- SendClientMessage(playerid, GREY,"* Type: /redmarker or /rm to place a red marker *");
- SendClientMessage(playerid, GREY,"* Type: /deleteclosestredmarker or /dcrm to delete the red marker closest to you *");
- SendClientMessage(playerid, GREY,"* Type: /deleteallredmarkers or /dallrm to delete all markers *");
- SendClientMessage(playerid, RED," * Flash Markers *");
- SendClientMessage(playerid, GREY,"* Type: /flashmarker or /fm to place a flash marker *");
- SendClientMessage(playerid, GREY,"* Type: /deleteclosestflashmarker or /dcfm to delete the flash marker closest to you *");
- SendClientMessage(playerid, GREY,"* Type: /deleteallflashmarkers or /dallfm to delete all flash markers *");
- SendClientMessage(playerid, GREY,"* Type: /markercredits for the Filterscript credits *");
- return 1;
- }
- if (strcmp(cmdtext,"/markercredits",true) == 0)
- {
- SendClientMessage(playerid, RED," * Marker Credits *");
- SendClientMessage(playerid, GREY,"* RMarkers Was Created By Killa[DGZ] 16-09-2010 *");
- return 1;
- }
- if(strcmp(cmdtext, "/redmarker", true) == 0 || strcmp(cmdtext, "/rm", true) == 0)
- {
- new Float:plocx,Float:plocy,Float:plocz;
- GetPlayerPos(playerid, plocx, plocy, plocz);
- CreateRMarker(plocx,plocy,plocz);
- return 1;
- }
- if(strcmp(cmdtext, "/deleteclosestredmarker", true) == 0 || strcmp(cmdtext, "/dcrm", true) == 0)
- {
- DeleteClosestRMarker(playerid);
- return 1;
- }
- if(strcmp(cmdtext, "/deleteallredmarkers", true) == 0 || strcmp(cmdtext, "/dallrm", true) == 0)
- {
- DeleteAllRMarker();
- return 1;
- }
- if(strcmp(cmdtext, "/flashmarker", true) == 0 || strcmp(cmdtext, "/fm", true) == 0)
- {
- new Float:plocx,Float:plocy,Float:plocz;
- GetPlayerPos(playerid, plocx, plocy, plocz);
- CreateFMarker(plocx,plocy,plocz);
- return 1;
- }
- if(strcmp(cmdtext, "/deleteclosestflashmarker", true) == 0 || strcmp(cmdtext, "/dcfm", true) == 0)
- {
- DeleteClosestFMarker(playerid);
- return 1;
- }
- if(strcmp(cmdtext, "/deleteallflashmarkers", true) == 0 || strcmp(cmdtext, "/dallfm", true) == 0)
- {
- DeleteAllFMarker();
- return 1;
- }
- return 0;
- }
- stock CreateRMarker(Float:x,Float:y,Float:z)
- {
- for(new i = 0; i < sizeof(Markcord); i++)
- {
- if(Markcord[i][Redmarker] == 0)
- {
- Markcord[i][Redmarker]=1;
- Markcord[i][redmX]=x;
- Markcord[i][redmY]=y;
- Markcord[i][redmZ]=z-0.7;
- Markcord[i][rmObject] = CreateObject(1213, x, y, z-1.0,0,0,300);//Red marker
- return 1;
- }
- }
- return 0;
- }
- stock DeleteAllRMarker()
- {
- for(new i = 0; i < sizeof(Markcord); i++)
- {
- if(Markcord[i][Redmarker] == 1)
- {
- Markcord[i][Redmarker]=0;
- Markcord[i][redmX]=0.0;
- Markcord[i][redmY]=0.0;
- Markcord[i][redmZ]=0.0;
- DestroyObject(Markcord[i][rmObject]);
- }
- }
- return 0;
- }
- stock DeleteClosestRMarker(playerid)
- {
- for(new i = 0; i < sizeof(Markcord); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, Markcord[i][redmX], Markcord[i][redmY], Markcord[i][redmZ]))
- {
- if(Markcord[i][Redmarker] == 1)
- {
- Markcord[i][Redmarker]=0;
- Markcord[i][redmX]=0.0;
- Markcord[i][redmY]=0.0;
- Markcord[i][redmZ]=0.0;
- DestroyObject(Markcord[i][rmObject]);
- return 1;
- }
- }
- }
- return 0;
- }
- stock CreateFMarker(Float:x,Float:y,Float:z)
- {
- for(new i = 0; i < sizeof(Markcords); i++)
- {
- if(Markcords[i][Flashmarker] == 0)
- {
- Markcords[i][Flashmarker]=1;
- Markcords[i][flamX]=x;
- Markcords[i][flamY]=y;
- Markcords[i][flamZ]=z-0.7;
- Markcords[i][flObject] = CreateObject(3526, x, y, z-1.05,0,15.3409,300);//flashing marker
- return 1;
- }
- }
- return 0;
- }
- stock DeleteAllFMarker()
- {
- for(new i = 0; i < sizeof(Markcords); i++)
- {
- if(Markcords[i][Flashmarker] == 1)
- {
- Markcords[i][Flashmarker]=0;
- Markcords[i][flamX]=0.0;
- Markcords[i][flamY]=0.0;
- Markcords[i][flamZ]=0.0;
- DestroyObject(Markcords[i][flObject]);
- }
- }
- return 0;
- }
- stock DeleteClosestFMarker(playerid)
- {
- for(new i = 0; i < sizeof(Markcords); i++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, Markcords[i][flamX], Markcords[i][flamY], Markcords[i][flamZ]))
- {
- if(Markcords[i][Flashmarker] == 1)
- {
- Markcords[i][Flashmarker]=0;
- Markcords[i][flamX]=0.0;
- Markcords[i][flamY]=0.0;
- Markcords[i][flamZ]=0.0;
- DestroyObject(Markcords[i][flObject]);
- return 1;
- }
- }
- }
- return 0;
- }
- #endif
Add Comment
Please, Sign In to add comment