SA-MP Forums Archive
[FilterScript] /siren Filterscript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] /siren Filterscript (/showthread.php?tid=333604)



/siren Filterscript FIXED - sampmark05 - 12.04.2012



Make sure this was added in:
Code:
new Siren[MAX_VEHICLES];
new SirenObject[MAX_VEHICLES];
You need to type this to your Gamemode.
Code:
CMD:siren(playerid, params[])
{
   if(IsACop(playerid)) {
       new string[128], type;
       new VID = GetPlayerVehicleID(playerid);
       if(sscanf(params, "d", type)) {
           SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /siren [type]");
           SendClientMessageEx(playerid, COLOR_GRAD2, "Type: 1 = Inside, 2 = Roof, 3 = Off.");
           return 1;
       }
       switch(type) {
           case 1:
           {
               if(Siren[VID] == 1) {
                   SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                   return 1;
               }
               new sendername[MAX_PLAYER_NAME];
               Siren[VID] = 1;
               GetPlayerName(playerid, sendername, sizeof(sendername));
               SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
               AttachObjectToVehicle(SirenObject[VID], VID, 0.0, 0.75, 0.275, 0.0, 0.1, 0.0);
               format(string, sizeof(string), "* %s puts the siren on the dashboard.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			   return 1;
           }
           case 2:
           {
               if(Siren[VID] == 1) {
                   SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle already has a siren!");
                   return 1;
               }
               Siren[VID] = 1;
               new sendername[MAX_PLAYER_NAME];
               GetPlayerName(playerid, sendername, sizeof(sendername));
               SirenObject[VID] = CreateObject(18646, 10.0, 10.0, 10.0, 0, 0, 0);
               AttachObjectToVehicle(SirenObject[VID], VID, -0.43, 0.0, 0.785, 0.0, 0.1, 0.0);
               format(string, sizeof(string), "* %s puts the siren on the roof.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               return 1;
           }
           case 3:
           {
               if(Siren[VID] == 0) {
                   SendClientMessageEx(playerid, COLOR_GRAD2, "This vehicle doesn't have a siren on it!");
                   return 1;
               }
               Siren[VID] = 0;
               new sendername[MAX_PLAYER_NAME];
               GetPlayerName(playerid, sendername, sizeof(sendername));
               DestroyObject(SirenObject[VID]);
               format(string, sizeof(string), "* %s takes down the siren.", sendername);
               ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
               return 1;
           }
           default:
           {
               SendClientMessageEx(playerid, COLOR_WHITE, "Invalid license type! /siren [type]");
               SendClientMessageEx(playerid, COLOR_GRAD2, "Type: 1 = Roof, 2 = Inside, 3 = Off.");
           }
      }
   }
   else SendClientMessageEx(playerid, COLOR_GREY, "You're not authorised to use this command.");
   return 1;
}
ZCMD - Can be coverted
Please post the bugs/problem so i can help you

/Siren 1



/Siren 2



/Siren 3




http://pastebin.com/nH0M9Zxn


CREDITs BY Brandon Javorsky


Re: /siren Filterscript - Mamaca - 12.04.2012

nice work


Re: /siren Filterscript - Faisal_khan - 12.04.2012

Good Job


Re: /siren Filterscript - sampmark05 - 12.04.2012

Thanks


Re: /siren Filterscript - sampmark05 - 12.04.2012

Quote:
Originally Posted by Faisal_khan
View Post
Good Job
Good Job too to your Moving Ship


Re: /siren Filterscript - [LvZ]Free - 12.04.2012

http://forum.sa-mp.com/showthread.ph...ighlight=siren Really ? Just copy and add a pics ?


Re: /siren Filterscript - DJJDgtamaat - 12.04.2012

its not work as i wil save it if got 4 Errors Help


Re: /siren Filterscript - sampmark05 - 13.04.2012

Quote:
Originally Posted by [LvZ]Free
View Post
http://forum.sa-mp.com/showthread.ph...ighlight=siren Really ? Just copy and add a pics ?
I copy but I Fixed it :P


Respuesta: /siren Filterscript - aNdReSk - 13.04.2012

Does it work for bikes


Re: /siren Filterscript - Akira297 - 25.08.2012

Quote:
Originally Posted by sampmark05
View Post
I copy but I Fixed it :P
<http://forum.sa-mp.com/showthread.ph...61#post2079161>

On-Topic : This thread said the same thing. They, just simply copy the NG:RP Coding of the siren. If you look at mine it isn't like that.

On-Topic: People do look at your coding, and we're not stupid as you think we are, you need to be a alittle more creative instead of just simply copying and pasting stuff.