[FilterScript] Police Faction/System ! [v1.0] -> Base Included
#1

Introduction:


- Hello, I created a Police System, or Faction.

Members commands:


pawn Code:
/Open -> Will open the gate !
/Barrier -> Will open the barrier !
/Cuff -> Will cuff a player ! [Needs to be in Range of point 4 metres.]
/Uncuff -> Will uncuff a player ! [Needs to be in Range of point 4 metres.]
/R -> Speak in Radio Chat. A player doesn\'t see the text if you are in Range of more 50 metres !
/Arrest -> Arrests a player, but police man needs to be in down pick-up !
/Wanted -> Setting wanted to a player !
Leaders commands:


pawn Code:
* Leaders have acces to Members command !

/MakeLeader || Syntax: /MakeLeader [ID] -> Will make Leader a player !
/Invite || Syntax: /Invite [ID] -> Will invite a player !
/FKick || Syntax: /FKick [ID] -> Will kicks a player from Faction !
RCON commands:


pawn Code:
/PoliceLeader || Syntax: /PoliceLeader [ID] -> Will make a player leader in Police Faction !
Preview:













Download:


- Pastebin ;

- Solidfiles [ALL PACK + includes ]

- Free Upload Site [ALL PACK + includes]

- Filedropper [ALL PACK + includes]

- Megafile [ALL PACK + includes]
Reply
#2

I really like it.


You make good things, Keep it up.


Repped.
Reply
#3

Quote:
Originally Posted by Stuun
View Post
I really like it.


You make good things, Keep it up.


Repped.
Thanks.
Reply
#4

This uses very insufficent code. Especially setting a player\'s color based on Wanted Level in OnPlayerUpdate.
And a few things plain out don\'t make sense:
Why give anti-kill to just cops? That has no logic, and gives cops unfair advantages. Also there is NO arrest system in place at all. When they get arrested, they have to (in RP servers, for the most part) either log off, or get an admin to let them out or some sort.
Reply
#5

Cool!
Reply
#6

Quote:
Originally Posted by Abagail
View Post
This uses very insufficent code. Especially setting a player\'s color based on Wanted Level in OnPlayerUpdate.

And a few things plain out don\'t make sense:

Why give anti-kill to just cops? That has no logic, and gives cops unfair advantages. Also there is NO arrest system in place at all. When they get arrested, they have to (in RP servers, for the most part) either log off, or get an admin to let them out or some sort.
Have GodMode 15 seconds at Spawn, at base..

Quote:
Originally Posted by ProKillerpa
View Post
Cool!
Thanks !
Reply
#7

nice work ! keep it up!
Reply
#8

Another inefficent method. You\'re going to waste 30 lines when you could only use 1? It looks awful like this in my opionon.


What I\'m taking about:
pawn Code:
new V1;
pawn Code:
new V2;


This could easily be done in one line using...
pawn Code:
#define MAX_VEHICLE 30
pawn Code:
new Vehicles[MAX_VEHICLE];


Uncuff can also easily be abused by Law Officers. You don\'t even check if they are cuffed or not. Example using your existing code checking if they are even cuffed:

pawn Code:
CMD:uncuff(playerid, params[])
{
    if(PlayerInfo[playerid][Member] >= 1 || PlayerInfo[playerid][Leader] >= 1)
        {
                new Float:X;
                new Float:Y;
                new Float:Z;
                GetPlayerPos(playerid, X, Y, Z);
        if(IsPlayerInRangeOfPoint(playerid, 4.0, X, Y, Z))
        {
                        new ID;
                        new string[128];
                        new name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, 24);
            if(sscanf(params,"i", ID)) return SendClientMessage(playerid,-1,"{FF0000}USAGE: {15FF00}/UnCuff [PlayerID]");
            if(GetPlayerSpecialAction(ID) == 24)
            {
                SetPlayerSpecialAction(ID, SPECIAL_ACTION_NONE);
                format(string, sizeof(string), "{0066CC}[POLICE]: {15FF00}You uncuffed {FF0000}%s {15FF00}!", ID);
                SendClientMessage(playerid, -1, string);
                format(string, sizeof(string), "{0066CC}{15FF00}You got uncuffed by Police Officer{FF0000}%s {15FF00}!", name);
                SendClientMessage(playerid, -1, string);
            }
        }
        }
        else
        {
                SCM(playerid, -1, "{FF0000}ERROR: {15FF00}You aren\'t Police !");
        }
        return 1;
}


Your indentation also makes me want to throw up. Just saying


EDIT: Also you have a few typos such as "metres" instead of "meters".
Reply
#9


Very Nice script. It is very good and easy to use, as well as with a lot of typos and things I didn\'t like. I\'ve edited it to my needs though and it is doing me just fine. Thank you for this great script.
Reply
#10

Quote:
Originally Posted by AllyForgien
View Post
Very Nice script. It is very good and easy to use, as well as with a lot of typos and things I didn\'t like. I\'ve edited it to my needs though and it is doing me just fine. Thank you for this great script.
last: 13/11/2014, 09:18 AM

g00d bump.
Reply
#11

There are a lot of repetition in your code, thats very bad coding.


You wanna avoid that.


Try to use seperate functions, instead of calling it directly every time.


Also dont use
PHP Code:
OnPlayerUpdate 
for that stuff.


Because you know exatly the time when he get wanteds, so you can change the color there.


No need to check every ms 1000 times.


And the check in
PHP Code:
OnPlayerEnterVehicle 
is complete wrong.


That will not work.


It means you can enter every car and it will say you are in a police car.
Reply
#12

Nice work keep it up!
Reply
#13

GOOD WORK
Reply
#14

good efforts
Reply
#15

Very nice work, That\'s cool
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)