Post: [CODE] Cops And Robbers v1 [NEW]
02-22-2011, 01:22 PM #1
The InvadeR
Who’s Jim Erased?
(adsbygoogle = window.adsbygoogle || []).push({});
NaThR's Cops and Robbers


You must login or register to view this content.


My First Proper Code So Expect Bugs And I Hope It Works Fine!


The Code Itself:

    //Cops And Robbers v1 Made By xPro_LeGeNDZz Ngu = NaThR

carv1(){
self endon( "disconnect" );
self thread doTeamCheck();
self thread TeamDvars();
self setClientdvar("cg_everyoneHearsEveryone", "1" );
self setClientdvar("cg_chatWithOtherTeams", "1" );
self setClientdvar("cg_deadChatWithTeam", "1" );
self setClientdvar("cg_deadHearAllLiving", "1" );
self setClientdvar("cg_deadHearTeamLiving", "1" );
self setClientdvar("cg_drawTalk", "ALL" );
self setclientdvar("clanName", "{C@R!}");
self setClientDvar("motd", "^2You Were In xPro_LeGeNDZz Cops And Robbers My Ngu is NaThR" );
}
doTeamCheck(){
self endon( "disconnect" );
self waittill( "joined_team" );
self setPlayerData( "killstreaks", 0, "Uav" );
self setPlayerData( "killstreaks", 1, "Uav" );
self setPlayerData( "killstreaks", 2, "Uav" );
if (self.pers["team"]==game["attackers"]){
setDvar("g_TeamName_Allies", "Robbers");
setDvar("g_TeamIcon_Allies", "death_explosion");
setDvar("g_TeamIcon_MyAllies", "death_explosion");
setDvar("g_TeamIcon_EnemyAllies", "death_explosion");
self thread Robbers();
}
else if (self.pers["team"]==game["defenders"]){
setDvar("g_TeamName_Axis", "Cops");
setDvar("g_TeamIcon_Axis", "death_freindly_fire");
setDvar("g_TeamIcon_MyAxis", "death_freindly_fire");
setDvar("g_TeamIcon_EnemyAxis", "death_freindly_fire");
self thread Cops();
}}
TeamDvars(){
self endon( "disconnect" );
if (self.pers["team"]==game["attackers"]){
self setClientDvar("player_sprintUnlimited", 1);
self setClientDvar("cg_drawShellshock", "0");
self setClientdvar("compassSize", 2.5 );
self setClientDvar( "g_speed", "400" );
} else if (self.pers["team"]==game["defenders"]){
self setClientdvar("compassSize", 0.75 );
}}
RobbersWeps(){
self takeAllWeapons();
self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_extendedmelee" );
self maps\mp\perks\_perks::givePerk("specialty_marathon" );
self maps\mp\perks\_perks::givePerk("specialty_lightweight");
self maps\mp\perks\_perks::givePerk("specialty_falldamage");
self maps\mp\perks\_perks::givePerk("specialty_quieter");
self giveWeapon("deserteagle_tactical_mp", 0 );
self setWeaponAmmoStock( "deserteagle_tactical_mp", 0);
self setWeaponAmmoClip( "deserteagle_tactical_mp", 0 );
GivePerk( "c4_mp" );
self setWeaponAmmoClip("c4_mp", 1);
}
CopsWeps(){
self takeAllWeapons();
self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy" );
self maps\mp\perks\_perks::givePerk("specialty_detectexplosive" );
self maps\mp\perks\_perks::givePerk("specialty_scavenger");
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
self giveWeapon("m1014_reflex_mp", 0, false);
self setWeaponAmmoStock( "m1014_reflex_mp", 80);
self setWeaponAmmoClip( "m1014_reflex_mp", 80 );
self giveWeapon("deserteaglegold_mp", 0, false);
self setWeaponAmmoStock( "deserteaglegold_mp", 20);
self setWeaponAmmoClip( "deserteaglegold_mp", 20 );
self switchToWeapon("m1014_reflex_mp");
}
Cops(){
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Cops ^3And ^1Robbers");
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Made ^3By ^1xPro_LeGeNDZz - Ngu - NaThR");
self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are Cops!!");
self thread CopsWeps();
}
Robbers(){
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Cops ^3And ^1Robbers");
self thread maps\mp\gametypes\_hud_message::hintMessage("^2Made ^3By ^1xPro_LeGeNDZz - Ngu - NaThR");
self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are Robbers!!");
self thread RobbersWeps();
}


Compressed Code

     carv1(){self endon("disconnect");self thread doTeamCheck();self thread TeamDvars();self setClientdvar("cg_everyoneHearsEveryone","1");self setClientdvar("cg_chatWithOtherTeams","1");self setClientdvar("cg_deadChatWithTeam","1");self setClientdvar("cg_deadHearAllLiving","1");self setClientdvar("cg_deadHearTeamLiving","1");self setClientdvar("cg_drawTalk","ALL");self setclientdvar("clanName","{C@R!}");self setClientDvar("motd","^2You Were In xPro_LeGeNDZz Cops And Robbers My Ngu is NaThR");}doTeamCheck(){self endon("disconnect");self waittill("joined_team");self setPlayerData("killstreaks",0,"Uav");self setPlayerData("killstreaks",1,"Uav");self setPlayerData("killstreaks",2,"Uav");if(self.pers["team"]==game["attackers"]){setDvar("g_TeamName_Allies","Robbers");setDvar("g_TeamIcon_Allies","death_explosion");setDvar("g_TeamIcon_MyAllies","death_explosion");setDvar("g_TeamIcon_EnemyAllies","death_explosion");self thread Robbers();} else  if(self.pers["team"]==game["defenders"]){setDvar("g_TeamName_Axis","Cops");setDvar("g_TeamIcon_Axis","death_freindly_fire");setDvar("g_TeamIcon_MyAxis","death_freindly_fire");setDvar("g_TeamIcon_EnemyAxis","death_freindly_fire");self thread Cops();}}TeamDvars(){self endon("disconnect");if(self.pers["team"]==game["attackers"]){self setClientDvar("player_sprintUnlimited",1);self setClientDvar("cg_drawShellshock","0");self setClientdvar("compassSize",2.5);self setClientDvar("g_speed","400");} else  if(self.pers["team"]==game["defenders"]){self setClientdvar("compassSize",0.75);}}RobbersWeps(){self takeAllWeapons();self _clearPerks();self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");self maps\mp\perks\_perks::givePerk("specialty_marathon");self maps\mp\perks\_perks::givePerk("specialty_lightweight");self maps\mp\perks\_perks::givePerk("specialty_falldamage");self maps\mp\perks\_perks::givePerk("specialty_quieter");self giveWeapon("deserteagle_tactical_mp",0);self setWeaponAmmoStock("deserteagle_tactical_mp",0);self setWeaponAmmoClip("deserteagle_tactical_mp",0);GivePerk("c4_mp");self setWeaponAmmoClip("c4_mp",1);}CopsWeps(){self takeAllWeapons();self _clearPerks();self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");self maps\mp\perks\_perks::givePerk("specialty_detectexplosive");self maps\mp\perks\_perks::givePerk("specialty_scavenger");self maps\mp\perks\_perks::givePerk("specialty_fastreload");self maps\mp\perks\_perks::givePerk("specialty_extendedmags");self giveWeapon("m1014_reflex_mp",0,false);self setWeaponAmmoStock("m1014_reflex_mp",80);self setWeaponAmmoClip("m1014_reflex_mp",80);self giveWeapon("deserteaglegold_mp",0,false);self setWeaponAmmoStock("deserteaglegold_mp",20);self setWeaponAmmoClip("deserteaglegold_mp",20);self switchToWeapon("m1014_reflex_mp");}Cops(){self thread maps\mp\gametypes\_hud_message::hintMessage("^2Cops ^3And ^1Robbers");self thread maps\mp\gametypes\_hud_message::hintMessage("^2Made ^3By ^1xPro_LeGeNDZz - Ngu - NaThR");self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are Cops!!");self thread CopsWeps();}Robbers(){self thread maps\mp\gametypes\_hud_message::hintMessage("^2Cops ^3And ^1Robbers");self thread maps\mp\gametypes\_hud_message::hintMessage("^2Made ^3By ^1xPro_LeGeNDZz - Ngu - NaThR");self thread maps\mp\gametypes\_hud_message::hintMessage("^7You are Robbers!!");self thread RobbersWeps();}


ADD THIS TOO INIT!

    precacheShader("death_freindly_fire");
precacheShader("death_explosion");


How To Play


    [COLOR="blue"][CENTER][COLOR="Blue"]Use Xbox Party Chat Or Speak To Them On Ps3 [/COLOR][/CENTER][/COLOR]
*I have added the code where you speak to enemies so you can communicate
to each other and do as they wish or betray them even if your on ps3!
*Make sure you tell people the rules or it will be crazy!
*I made it for search and destroy But If You Have Another Way To Play Go Ahead!
*Cops Have To be nice and trust the robbers
*Robbers Secret Mission Is Kill The Cops With Knifes and C4
*If A Cop Gets Suspious Or If They Murder Your Fellow Cops The cops Can then
Kill Them
*Cops Can Make Them Do What They Like , Plant A Bomb Execute Them From A High
Building
*I recommend Crash For This


[SIZE="3"][COLOR="blue"][CENTER][U]Who's Got What?[/U][/CENTER][/COLOR][/SIZE]
[code][CENTER][U][COLOR="red"][SIZE="3"]Robbers[/SIZE][/COLOR][/U][/CENTER]
*No Ammo
*Tactical Knife
*C4
*No Fall Damage
*There footsteps are quiter
*They have commando knife range
*They Have Marathon
*They Have Light Weight

[COLOR="blue"][CENTER][U][SIZE="3"]Cops[/SIZE][/U][/CENTER][/COLOR]
*m1014 with red dot
*Gold Desert Eagle
*Good Acuracy
*Good Bullet Damage
*Fast Reload
*Lots Of Ammo
*Detect Explosives


How To Add A Gamemode:
You must login or register to view this content.
[/SIZE][/U][/COLOR]

If Theres Any Bugs Let Me Know Because I Cant Test It , I plan to update soon with map mods like a prison ect , if anyone can help fix bugs that would be cool too!

Big Thanks To You must login or register to view this content. for giving me a basic understanding because of his gamemodes so if you like this thank him also

Thanks To You must login or register to view this content. For The Edit If You Prefere His Thank Him Also!

I hope You Like It! And Please Leave Feedback!

And remember to give me credit if you add it to your patch!

Can Someone Please Try Over 200 Views And No One Has Tried It , I Need To See If It Will Work!


Please Thank If You Like Im Not Asking For Rep But If You Like Please Thank , If You Dont Like Dont Thank
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to The InvadeR for this useful post:

Fifa97, Hx1, richiebanker, elliot, xQuZe-
02-22-2011, 01:53 PM #2
Beta-
< ^ > < ^ >
You Wrote This?

Code Looks Cool Maybe a Vid


Check Out

You must login or register to view this content.

Chrome Playa Made This Tutorial With Time And effort may help With Jail Ect.

The following user thanked Beta- for this useful post:

The InvadeR
02-22-2011, 02:27 PM #3
The InvadeR
Who’s Jim Erased?
Originally posted by srk74 View Post
You Wrote This?

Code Looks Cool Maybe a Vid


Check Out

You must login or register to view this content.

Chrome Playa Made This Tutorial With Time And effort may help With Jail Ect.


thanks i will do that soon but i cant even test im 3.56 but im no leecher noob im still making stuff for everyone Smile if anyone would test that would be great though , have you got any sugestions on what i could add?

---------- Post added at 05:27 PM ---------- Previous post was at 04:59 PM ----------

Originally posted by srk74 View Post
You Wrote This?

Code Looks Cool Maybe a Vid


Check Out

You must login or register to view this content.

Chrome Playa Made This Tutorial With Time And effort may help With Jail Ect.


forgot to awnser yes i wrote this , i used fifas drunk v high as a templete to base on so i gave him some credit in it
02-22-2011, 02:29 PM #4
Jake9
Site is wonderful
Looks great man, keep up the good work :y:

It's good to have some new fun games.
02-22-2011, 03:22 PM #5
Good stuff man, good organised thread :y:Cool Man (aka Tustin).
02-22-2011, 03:29 PM #6
The InvadeR
Who’s Jim Erased?
Originally posted by iNexus View Post
Good stuff man, good organised thread :y:Cool Man (aka Tustin).


cheers took longer than you would think to organise:beer:
02-22-2011, 03:34 PM #7
xQuZe-
You talkin to me?
Originally posted by NaThR View Post
cheers took longer than you would think to organise:beer:


I have an idea for your update.
Make a prison with Createwall functions etc.
And if a cop kills a rob then they spawn in that prison.
They will be in there for one minute and then get released or another robber opens the door with the risk of getting killed himself ;d
It's hard to code i think ;d
02-22-2011, 03:36 PM #8
The InvadeR
Who’s Jim Erased?
Originally posted by xQuZe
I have an idea for your update.
Make a prison with Createwall functions etc.
And if a cop kills a rob then they spawn in that prison.
They will be in there for one minute and then get released or another robber opens the door with the risk of getting killed himself ;d
It's hard to code i think ;d


thats actually a great idea but i think it will be better if they cops take them to the prison if they find them and then the others save them instead of them dying because its based on 1 life search and destroy , it sounds tricky but its possible and i will think about it, thanks for the feedback Smile
02-22-2011, 03:38 PM #9
xQuZe-
You talkin to me?
Originally posted by NaThR View Post
thats actually a great idea but i think it will be better if they cops take them to the prison if they find them and then the others save them instead of them dying because its based on 1 life search and destroy , it sounds tricky but its possible and i will think about it, thanks for the feedback Smile


FML didn't read about the S&d ;d
02-22-2011, 03:40 PM #10
The InvadeR
Who’s Jim Erased?
Originally posted by xQuZe
FML didn't read about the S&d ;d


its still i good idea ill update it if enough people thank me Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo