[FilterScript] /siren Filterscript
#1



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
Reply
#2

nice work
Reply
#3

Good Job
Reply
#4

Thanks
Reply
#5

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

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

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

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
Reply
#9

Does it work for bikes
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)