Quantcast

Jump to content

» «
Photo

random cop skins in cities (SA) (idea)

5 replies to this topic
mr_bekir141
  • mr_bekir141

    Player Hater

  • Members
  • Joined: 05 Apr 2017
  • Turkey

#1

Posted 28 March 2018 - 05:38 PM Edited by mr_bekir141, 28 March 2018 - 05:42 PM.

Hello, Everyone!

 

-I have an idea which is gonna make Los Santos, San Fierro and Las Venturas cops spawn in these cities randomly. I'd do it myself but... I don't know how to do  :facedesk: .

 

-I just don't want to see same cop skin in Los Santos all the time. It is not realistic. Same skin in streets, same skin in cars and same skin in fights. 

"""My idea is make 3 skin spawn randomly.""" (hope you guys get what im talking about)

 

-I think it's about Data folder. I tried to make this with cleo but i do not know how to use Sanny Builder. I search about those spawn thing in Data Folder but i did not find anything that would work.

 

-So, i wish someone reads it and makes the mod. :lol: 


Jack
  • Jack

    MODEL_SWAT

  • Feroci
  • Joined: 06 Dec 2011
  • Serbia

#2

Posted 30 March 2018 - 09:23 AM Edited by Jack, 30 March 2018 - 01:29 PM.

#include "plugin.h"
#include "CTheZones.h"

using namespace plugin;
class RandomCopModels {
public:
    RandomCopModels() {
        Events::gameProcessEvent += [] {
            DWORD city = CTheZones::m_CurrLevel;
            int randomCopModel = (rand() % 4 + MODEL_LAPD1);    //    3 diferent cop skins in range 280-283 ; (MODEL_LAPD1 is 280)
            DWORD pntr = patch::GetUInt(0x407C94 + 3);
            city *= 4;    //    4 bytes lenght
            pntr += city;
            patch::SetUInt(pntr, randomCopModel);
        };
    }
} randomCopModels;

or use Wanted Level Editor.

 

EDIT: Removed unnecessary model load as well as the town check.

  • mr_bekir141 likes this

mr_bekir141
  • mr_bekir141

    Player Hater

  • Members
  • Joined: 05 Apr 2017
  • Turkey

#3

Posted 30 March 2018 - 08:02 PM

#include "plugin.h"
#include "CTheZones.h"

using namespace plugin;
class RandomCopModels {
public:
    RandomCopModels() {
        Events::gameProcessEvent += [] {
            DWORD city = CTheZones::m_CurrLevel;
            int randomCopModel = (rand() % 4 + MODEL_LAPD1);    //    3 diferent cop skins in range 280-283 ; (MODEL_LAPD1 is 280)
            DWORD pntr = patch::GetUInt(0x407C94 + 3);
            city *= 4;    //    4 bytes lenght
            pntr += city;
            patch::SetUInt(pntr, randomCopModel);
        };
    }
} randomCopModels;

or use Wanted Level Editor.

 

EDIT: Removed unnecessary model load as well as the town check.

 

Thank You Thank you thank YOU!!!!!!!!!!! 


mr_bekir141
  • mr_bekir141

    Player Hater

  • Members
  • Joined: 05 Apr 2017
  • Turkey

#4

Posted 4 weeks ago

#include "plugin.h"
#include "CTheZones.h"

using namespace plugin;
class RandomCopModels {
public:
    RandomCopModels() {
        Events::gameProcessEvent += [] {
            DWORD city = CTheZones::m_CurrLevel;
            int randomCopModel = (rand() % 4 + MODEL_LAPD1);    //    3 diferent cop skins in range 280-283 ; (MODEL_LAPD1 is 280)
            DWORD pntr = patch::GetUInt(0x407C94 + 3);
            city *= 4;    //    4 bytes lenght
            pntr += city;
            patch::SetUInt(pntr, randomCopModel);
        };
    }
} randomCopModels;

or use Wanted Level Editor.

 

EDIT: Removed unnecessary model load as well as the town check.

 

dude, i can't use your program. i need another solution. but thanks anyway


mr_bekir141
  • mr_bekir141

    Player Hater

  • Members
  • Joined: 05 Apr 2017
  • Turkey

#5

Posted 4 weeks ago

I still need  help :/


Jack
  • Jack

    MODEL_SWAT

  • Feroci
  • Joined: 06 Dec 2011
  • Serbia

#6

Posted 4 weeks ago

dude, i can't use your program. i need another solution. but thanks anyway

Why? What's the problem?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users