|
 |
|
|
|
|
|
GTA Modification Forums
Make police use another weapon? As you can see above... is it possible?
 |
|
 |
| |
SWEG4MER  |
|
Player Hater

Group: Members
Joined: Sep 14, 2012

|
| QUOTE (ch3y3zze @ Friday, Sep 14 2012, 17:39) | | CODE | namespace NiceCops { using System; using GTA;
public class Main : Script { Tick += new EventHandler(Main_Tick); } private void Main_Tick(object sender, EventArgs e) { //if u have more than 1 star script will deactivate and cops with bats deleted //so game can replace with normal cops if (Game.LocalPlayer.WantedLevel > 1)//change wanted level here if u like { Ped[] pedArray = World.GetAllPeds();
foreach (Ped cop in pedArray) { //finds cops with bats and deletes if (Game.Exists(cop) && cop.RelationshipGroup == RelationshipGroup.Cop && cop.Weapons.BaseballBat.Ammo == 1) { if (!cop.isOnScreen) cop.Delete(); } } } else//here u onnly have 0 or 1 star so all cops will have bats only;D { Ped[] pedArray = World.GetAllPeds();
foreach (Ped cop in pedArray) { if (Game.Exists(cop) && cop.RelationshipGroup == RelationshipGroup.Cop && cop.Weapons.BaseballBat.Ammo < 1) { if (cop.isAliveAndWell) { cop.Weapons.RemoveAll(); cop.Weapons.BaseballBat.Ammo = 1; } } } } } } |
I rewrote at work so if it crashes tell me error and ill fix it
http://dl.dropbox.com/u/55310026/NiceCops.cs |
wow really thank you... im sure this gonna work if i get it right... at the moment i have xlive.dll and scripthook.dll installed... do i miss something? i have putted the nicecops.cs in scripts but still no change... Here's a cookie for your hard work :3  EDIT: I downloaded you nicecop.cs file and putted it in the script folder... I have scripthook and xlive dll installed The cops still have the glocks and no kind of baseball bat is seen... I think i am missing something ... and i really respect your hard work to help me but i'm a bit stuping when it comes to modding... This post has been edited by SWEG4MER on Friday, Sep 14 2012, 18:58
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
SWEG4MER  |
|
Player Hater

Group: Members
Joined: Sep 14, 2012

|
Okay i found a error log ... because im a swede the error log is in swedish so i tried to translate it ...
2012-09-14 21:02:06 - Initializing Script Hook Dotnet v1.7.1.7 BETA (on GTA IV version 1.0.7.0 with C + + Hook version 0.5.1) 2012-09-14 21:02:53 - Direct3D device created!
2012-09-14 21:02:53 - SEARCHING FOR SCRIPTS ... 2012-09-14 21:02:53 - Loading dynamic script file 'scripts \ NiceCops.cs' ... 2012-09-14 21:02:53 - 10 Errors in script 'C: \ Program Files (x86) \ Rockstar Games \ Grand Theft Auto IV \ scripts \ NiceCops.cs': In Line 8: Token + = is invalid in a declaration for a class, structure, or interface member In Line 8: The method must have a return type in Line 8: An identifier expected in Line 11: A class, delegate, enumeration, an interface or a structure is expected in Line 18: An identifier expected in Line 18: A class, delegate, enumeration, an interface or a structure is expected in Line 30: A namespace can not contain direct members as fields or methods In Line 32: An identifier expected in Line 32: A class, delegate, enumeration, an interface or a structure is expected in Line 45: A type or namespace definition or end of file expected 2012-09-14 21:02:53 - DONE! No. DotNet script found! 2012-09-14 21:02:53 - INFO: Phone number checks are not available! 2012-09-14 21:04:36 - Direct3D device lost!
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(3) [1] 2 3
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|