SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 11/11/2014, 06:38 PM   #1
HY
Gangsta
 
HY's Avatar
 
Join Date: Sep 2014
Location: România.
Posts: 545
Reputation: 87
Default Police Faction/System ! [v1.0] -> Base Included

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]
__________________
hi.
HY is offline   Reply With Quote
Old 11/11/2014, 06:40 PM   #2
Glossy42O
High-roller
 
Join Date: Oct 2014
Location: in my house
Posts: 1,851
Reputation: 231
Default Re: Police Faction/System ! [v1.0] -> Base Included

I really like it.

You make good things, Keep it up.

Repped.
Glossy42O is offline   Reply With Quote
Old 11/11/2014, 08:13 PM   #3
HY
Gangsta
 
HY's Avatar
 
Join Date: Sep 2014
Location: România.
Posts: 545
Reputation: 87
Default Re: Police Faction/System ! [v1.0] -> Base Included

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

You make good things, Keep it up.

Repped.
Thanks.
__________________
hi.
HY is offline   Reply With Quote
Old 11/11/2014, 08:52 PM   #4
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,412
Reputation: 442
Default Re: Police Faction/System ! [v1.0] -> Base Included

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.
Abagail is offline   Reply With Quote
Old 12/11/2014, 12:12 AM   #5
ProKillerpa
High-roller
 
ProKillerpa's Avatar
 
Join Date: May 2013
Location: Rio Grande do Sul
Posts: 1,201
Reputation: 142
Default Re: Police Faction/System ! [v1.0] -> Base Included

Cool!
__________________
Nostalgia é oque nos resta...
ProKillerpa is offline   Reply With Quote
Old 12/11/2014, 12:59 PM   #6
HY
Gangsta
 
HY's Avatar
 
Join Date: Sep 2014
Location: România.
Posts: 545
Reputation: 87
Default Re: Police Faction/System ! [v1.0] -> Base Included

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 !
__________________
hi.
HY is offline   Reply With Quote
Old 12/11/2014, 01:06 PM   #7
Alex Magaņa
High-roller
 
Alex Magaņa's Avatar
 
Join Date: Oct 2012
Location: 𝕭𝖗𝖔𝖙𝖍𝖊𝖗𝖍𝖔𝖔𝖉
Posts: 2,466
Reputation: 216
Default Re: Police Faction/System ! [v1.0] -> Base Included

nice work ! keep it up!
__________________

HOME --- FORUMS --- DISCORD --- SERVER
Alex Magaņa is offline   Reply With Quote
Old 13/11/2014, 01:18 AM   #8
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,412
Reputation: 442
Default Re: Police Faction/System ! [v1.0] -> Base Included

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".
Abagail is offline   Reply With Quote
Old 03/01/2019, 09:53 PM   #9
AllyForgien
Little Clucker
 
Join Date: Jan 2017
Posts: 2
Reputation: 0
Default Re: Police Faction/System ! [v1.0] -> Base Included


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.
AllyForgien is offline   Reply With Quote
Old 07/01/2019, 12:38 AM   #10
AzaMx
Huge Clucker
 
Join Date: Aug 2014
Location: Home.
Posts: 360
Reputation: 63
Default Re: Police Faction/System ! [v1.0] -> Base Included

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.
AzaMx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Map] Base / Police / Jail Map :D My 1st Map JSkulloz Maps 4 08/05/2013 06:11 PM
[Weird Issue] Why wouldn't a file be included into a compilation? Yet the files next to it are included... [HLF]Southclaw Scripting Help 3 25/02/2013 11:09 PM
Police Faction Anthony_Lloyd101 Help Archive 2 22/03/2010 03:52 AM
Police faction help Josh_Kerns Help Archive 5 18/03/2010 04:28 AM


All times are GMT. The time now is 12:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.