[Help]How to make Police System -
alekschowee - 11.07.2016
Help
Re: [Help]How to make Police System -
F1N4L - 11.07.2016
Post more details for this system...
Re: [Help]How to make Police System -
Jonesy96 - 11.07.2016
You can't really come onto the forums, and ask someone to make an entire system for you..If you're having to do that, I'd politely suggest that you may need to learn some basics before hand (No offense intended).
Learn the basics of PAWN, and also MySQL, and how MySQL integrates with PAWN. Once you're fairly comfortable, design and plan your own police system, for how you wish it to work to your own bespoke needs. Then...try and script it. If you need help at that point, with certain things then by all means, help will be available.
Re: [Help]How to make Police System -
Flake. - 11.07.2016
Код:
new PoliceMan[MAX_PLAYERS];
if(PoliceMan[playerid] == 1) return SendClientMessage(playerid, -1, "You're a cop!");
So on so forth.
Re: [Help]How to make Police System -
alekschowee - 11.07.2016
Commands:/buycop- to buy police badge
/arrest- to arrest player for time and reason
/wanted
Re: [Help]How to make Police System -
Sew_Sumi - 11.07.2016
(*|Flake|*) got it best for comedic value.
Other than that you need the Looking for Scripters thread, or you're gonna need to start learning.
Team systems are simple, and tutorials are out there.
Re: [Help]How to make Police System -
vikoo - 11.07.2016
POLICE system by
DRAGON
https://sampforum.blast.hk/showthread.php?tid=436193
Re: [Help]How to make Police System -
Sew_Sumi - 11.07.2016
Quote:
Originally Posted by vikoo
|
This guy lifts.
Re: [Help]How to make Police System -
vikoo - 11.07.2016
who is lifts?
Re: [Help]How to make Police System -
F1N4L - 11.07.2016
This is very simple, but... (I have not tested)
Код:
#include a_samp
#include sscanf2
#include zcmd
new bool:Arrested[MAX_PLAYERS], TimeArrested[MAX_PLAYERS];
main() {
SetTimer("CheckArrested", 1000, true);
}
CMD:buycop(playerid)
{
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "You don't have money [$ 5.000].");
GivePlayerMoney(playerid, - 5000);
SendClientMessage(playerid, -1, "Now you is a Cop!");
return 1;
}
CMD:arrest(playerid, params[])
{
new Target, Time, Reason[30];
if(sscanf(params, "uis[30]", Target, Time, Reason)) return SendClientMessage(playerid, -1, "/arrest [name/id] [time (minutes)] [reason]");
if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, -1, "PlayerID not connected.");
if(Time < 0) return SendClientMessage(playerid, -1, "Invalid time.");
TogglePlayerControllable(Target, 0);
TimeArrested[Target] = Time * 60 + gettime();
Arrested[Target] = true;
return 1;
}
forward CheckArrested();
public CheckArrested()
{
for(new i = 0; i < MAX_PLAYERS; ++ i)
{
if(!IsPlayerConnected(i)) continue;
if(Arrested[i] == true)
{
if(TimeArrested[i] > gettime()) TimeArrested[i] --;
else Arrested[i] = false, TimeArrested[i] = 0;
}
}
}