[GameMode] Los Santos Cops 'n' Robbers Get Started
#1

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

Nice GameMode
Reply
#3

good job nice work man
Reply
#4

Thanks for the Credits
Reply
#5

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

Nice GM. 9/10
Reply
#7

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

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

Quote:
Originally Posted by FlawPaw
View Post
This is just the starting of a CnR script, it's unfinished.
Well, this is not even the base of a CNR.
Reply
#10

Remove, misunderstood.
Reply
#11

Nice Gamemode
Reply
#12

Extremely bugged when an dialog based Task appears in the server !
Reply
#13

Can you provide pics of the bug and we updated this version me and meow22

https://sampforum.blast.hk/showthread.php?tid=474740
Reply
#14

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
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?
Reply
#15

does it work on ultra ?? and does it have worcking admin cmds
Reply
#16

Nice ! Awesome Gamemode
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)