Los Santos Cops 'n' Robbers Get Started -
DarkLored - 15.10.2013
Los Santos Cops 'n' Robbers
Hello i made a start of for a los santos cops and robbers so players will basicly know how to start of
with a cops and robbers gm and its a head start for them
Features in the gm:
City Hall Robbery place
and 24/7 shop robbery near gas station in idlewood
a jail system for the /ar command
Criminal Skills:
Rapist
Robber
Cop Commands:
/cuff - To cuff the players
/uncuff - to uncuff them
/ar - to arrest them
Criminal Commands:
/rob - To rob players
/rape - To rape players
Regular Player Cmds:
/gunpack1 - to spawn gunpack 300 score needed
/gunpack2 - 500 score needed
/gunpack3 - Regular Player Stats you can set it in the scriptfiles and user ini
/rpcmds - to view Regular Player cmds
/rc - Regular Player Chat
General Commands:
/commands - to view commands
/kill - to kill your self
Admin Commands:
level 1:/warn,/clearchat,/adan
level 2:/kick,/goto
level 3:/setarmor,/sethp,/fly,/ban,/givemoney
level 4:/unban
level 5:/makeadmin
Credits:
****** - for ysi and sscanf2
Ingito - for making streamer and i dont know how to spell his name
![Cheesy](images/smilies/biggrin.png)
Zeex - for making zcmd
Meow22 - For making the next version with me and helping me on the first version
Terms of use :
well there is no terms for this gamemode
have fun with it
Download:
Los Santos Cops 'n' Robbers.rar
Re: Los Santos Cops 'n' Robbers Get Started - Nofear192 - 16.10.2013
Nice GameMode
Re: Los Santos Cops 'n' Robbers Get Started -
Vaishnav - 16.10.2013
good job nice work man
Re: Los Santos Cops 'n' Robbers Get Started -
Meow22 - 16.10.2013
Thanks for the Credits
Re: Los Santos Cops 'n' Robbers Get Started -
DarkLored - 16.10.2013
Thanks guys
Quote:
Originally Posted by Nofear192
oh lol thanks for giving me credits :3 I helped u with some commands
|
Sure i will buddy
Re: Los Santos Cops 'n' Robbers Get Started -
DeanSta - 30.10.2013
Nice GM. 9/10
Re: Los Santos Cops 'n' Robbers Get Started -
AnonScripter - 01.11.2013
6/10, well it's nice script for beginners if you are.
6/10 because Cops And Robbers Gamemode can't be only 2500 lines, i'm scripting CnR Server and i'm about to reach line 38500
1. You didn't use OnPlayerText Callback, it's so important, for spamming.
2. You didn't use OnPlayerUpdate Callback, it's so important
3. You are checking the situation more than 1 time and this will causes bugs in the command.
Example:
pawn Код:
if(gTeam[playerid] != Team_Cop)
{
SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can place cuffs on suspects.");
return 1;
}
if(gTeam[playerid] == Team_Cop)
{
if(GetDistanceBetweenPlayers(playerid,targetid) <= 2)
{
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Suspect Cuffed_]]");
SendClientMessage(targetid,COLOR_DEADCONNECT,"[[_Placed in handcuffs_]]");
SendClientMessage(targetid,COLOR_LIGHTBLUE,"TRY /breackcuffs QUICKLY!!!");
TogglePlayerControllable(targetid,0);
SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
SetPVarInt(targetid, "Cuffed", 1);
SetPVarInt(targetid, "CuffTimer", 30);
SendClientMessage(playerid, COLOR_DODGERBLUE, "[POLICE] You have cuffed a suspect. You have 30 seconds before they are let loose.");
return 1;
}
}
4. SetPlayerToTeamColor callback is defined 2 times.
5. You can use:
pawn Код:
public WantedLevelColor(playerid)
{
new pwl = GetPlayerWantedLevel(playerid);
if(6 <= pwl <= 28)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 4 || pwl == 5)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
if(1 <= pwl <= 3)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(pwl == 0)
{
SetPlayerToTeamColor(playerid);
}
return 1;
}
INSTEAD OF:
pawn Код:
public WantedLevelColor(playerid)
{
new pwl = GetPlayerWantedLevel(playerid);
if(pwl == 28)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 24)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 18)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 12)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 10)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 8)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 6)
{
SetPlayerColor(playerid, COLOR_RED);
}
if(pwl == 5)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
if(pwl == 4)
{
SetPlayerColor(playerid, COLOR_ORANGE);
}
if(pwl == 3)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(pwl == 2)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(pwl == 1)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
if(pwl == 0)
{
SetPlayerToTeamColor(playerid);
}
return 1;
}
it's just an advice for you
Re: Los Santos Cops 'n' Robbers Get Started -
FlawPaw - 02.11.2013
Quote:
Originally Posted by AnonScripter
6/10 because Cops And Robbers Gamemode can't be only 2500 lines, i'm scripting CnR Server and i'm about to reach line 38500
|
This is just the starting of a CnR script, it's unfinished.
Quote:
Originally Posted by DarkLored
Hello i made a start of for a los santos cops and robbers so players will basicly know how to start of
with a cops and robbers gm and its a head start for them
|
Re: Los Santos Cops 'n' Robbers Get Started -
CrazyChoco - 02.11.2013
Quote:
Originally Posted by FlawPaw
This is just the starting of a CnR script, it's unfinished.
|
Well, this is not even the base of a CNR.
Re: Los Santos Cops 'n' Robbers Get Started -
JaKe Elite - 02.11.2013
Remove, misunderstood.
Re: Los Santos Cops 'n' Robbers Get Started -
NowOrnever - 15.11.2013
Nice Gamemode
Re: Los Santos Cops 'n' Robbers Get Started -
iAnonymous - 15.11.2013
Extremely bugged when an dialog based Task appears in the server !
Re: Los Santos Cops 'n' Robbers Get Started -
DarkLored - 15.11.2013
Can you provide pics of the bug and we updated this version me and meow22
https://sampforum.blast.hk/showthread.php?tid=474740
Re: Los Santos Cops 'n' Robbers Get Started -
thefatshizms - 16.11.2013
Quote:
Originally Posted by AnonScripter
6/10, well it's nice script for beginners if you are.
6/10 because Cops And Robbers Gamemode can't be only 2500 lines, i'm scripting CnR Server and i'm about to reach line 38500
1. You didn't use OnPlayerText Callback, it's so important, for spamming.
2. You didn't use OnPlayerUpdate Callback, it's so important
3. You are checking the situation more than 1 time and this will causes bugs in the command.
Example:
pawn Код:
if(gTeam[playerid] != Team_Cop) { SendClientMessage(playerid,COLOR_ERROR,"Only law enforcement can place cuffs on suspects."); return 1; } if(gTeam[playerid] == Team_Cop) { if(GetDistanceBetweenPlayers(playerid,targetid) <= 2) { SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Suspect Cuffed_]]"); SendClientMessage(targetid,COLOR_DEADCONNECT,"[[_Placed in handcuffs_]]"); SendClientMessage(targetid,COLOR_LIGHTBLUE,"TRY /breackcuffs QUICKLY!!!"); TogglePlayerControllable(targetid,0); SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED); SetPVarInt(targetid, "Cuffed", 1); SetPVarInt(targetid, "CuffTimer", 30); SendClientMessage(playerid, COLOR_DODGERBLUE, "[POLICE] You have cuffed a suspect. You have 30 seconds before they are let loose."); return 1; } }
4. SetPlayerToTeamColor callback is defined 2 times.
5. You can use:
pawn Код:
public WantedLevelColor(playerid) { new pwl = GetPlayerWantedLevel(playerid); if(6 <= pwl <= 28) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 4 || pwl == 5) { SetPlayerColor(playerid, COLOR_ORANGE); } if(1 <= pwl <= 3) { SetPlayerColor(playerid, COLOR_YELLOW); } if(pwl == 0) { SetPlayerToTeamColor(playerid); } return 1; }
INSTEAD OF:
pawn Код:
public WantedLevelColor(playerid) { new pwl = GetPlayerWantedLevel(playerid); if(pwl == 28) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 24) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 18) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 12) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 10) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 8) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 6) { SetPlayerColor(playerid, COLOR_RED); } if(pwl == 5) { SetPlayerColor(playerid, COLOR_ORANGE); } if(pwl == 4) { SetPlayerColor(playerid, COLOR_ORANGE); } if(pwl == 3) { SetPlayerColor(playerid, COLOR_YELLOW); } if(pwl == 2) { SetPlayerColor(playerid, COLOR_YELLOW); } if(pwl == 1) { SetPlayerColor(playerid, COLOR_YELLOW); } if(pwl == 0) { SetPlayerToTeamColor(playerid); } return 1; }
it's just an advice for you ![Smiley](images/smilies/smile.png)
|
Why is OnPlayerUpdate so important?
pawn Код:
public OnPlayerUpdate(playerid)
{
PlayerInfo[playerod][pAfk] = gettime();
return 1;
}
is all I have.
Also,
pawn Код:
new pwl = GetPlayerWantedLevel(playerid);
switch(pwl)
{
case 6..28: SetPlayerColor(playerid, COLOR_RED);
case 4 || 5: SetPlayerColor(playerid, COLOR_ORANGE);
case 1..3: SetPlayerColor(playerid, COLOR_YELLOW);
case 0: SetPlayerToTeamColor(playerid);
}
Switch is faster than if statements.
"You are checking the situation more than 1 time and this will causes bugs in the command.
Example:"
how exactly would that create a bug?
Re: Los Santos Cops 'n' Robbers Get Started -
hulk14 - 12.11.2015
does it work on ultra ?? and does it have worcking admin cmds
Re: Los Santos Cops 'n' Robbers Get Started -
CrunchxNoy - 23.12.2015
Nice ! Awesome Gamemode