Quantcast

Jump to content

» «
Photo

[IV|rel]Two mini mods

11 replies to this topic
HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#1

Posted 05 January 2009 - 03:07 PM Edited by HippieCommunist, 05 January 2009 - 07:12 PM.

first - No telepatic Police

tired of cops falling from the roof after uve killed only 3 peds?
with this mod u get wanted only if theres actual cop around when makin' the felony (latest update is 0.6)

CODE
 PLAYER_ID, PLAYER_INDEX, PLAYER_CHAR = 0

function InitScript()
 -- blah-blah-blah
 Wait(10000)
end

function WaitForPlayerPoolCreation()
 while (IsPlayerPoolCreated() == 0) do
   Wait(2000)
 end
end

function WaitForValidPlayer()
 PLAYER_CHAR = 0
 repeat
   CallNative("GET_PLAYER_ID")
PLAYER_ID = GetIntResult()
if (PLAYER_ID >= 0) then
  PushInt(PLAYER_ID)
  CallNative("CONVERT_INT_TO_PLAYERINDEX")
  PLAYER_INDEX = GetIntResult()
  PushInt(PLAYER_INDEX)
     PushVarPtr()
  CallNative("GET_PLAYER_CHAR")
  PLAYER_CHAR = GetIntParam(1)
  if (PLAYER_CHAR <= 0) then
    Wait(1000)
  end  
end
 until (PLAYER_CHAR > 0)  
end

function SetPlayerProperties()
PushFloat(0.6)
CallNative("SET_WANTED_MULTIPLIER")
end

function main()
 InitScript()
 while true do
   WaitForPlayerPoolCreation()
   WaitForValidPlayer()
   SetPlayerProperties()
Wait(3000)
 end
end

-- start
main();


second - Open/Close car components (no multi-keys or combos)
PgUp - opens hood
PgDn - opens trunk
End - Closes everything

CODE
PLAYER_ID, PLAYER_INDEX, PLAYER_CHAR, SAVEDONE, PLAYER_CAR = 0

function InitScript()
-- blah-blah-blah
Wait(10000)
end

function WaitForPlayerPoolCreation()
while (IsPlayerPoolCreated() == 0) do
  Wait(2000)
end
end

function WaitForValidPlayer()
PLAYER_CHAR = 0
repeat
  CallNative("GET_PLAYER_ID")
PLAYER_ID = GetIntResult()
if (PLAYER_ID >= 0) then
 PushInt(PLAYER_ID)
 CallNative("CONVERT_INT_TO_PLAYERINDEX")
 PLAYER_INDEX = GetIntResult()
 PushInt(PLAYER_INDEX)
    PushVarPtr()
 CallNative("GET_PLAYER_CHAR")
 PLAYER_CHAR = GetIntParam(1)
 if (PLAYER_CHAR <= 0) then
   Wait(1000)
 end  
end
until (PLAYER_CHAR > 0)  
end

function PlayerIsInCar()
PushInt(PLAYER_CHAR)
CallNative("IS_CHAR_ON_ANY_BIKE")
if (GetIntResult() == 1) then
return 0
else
PushInt(PLAYER_CHAR)
CallNative("IS_CHAR_IN_ANY_HELI")
if (GetIntResult() == 1) then
return 0
else
PushInt(PLAYER_CHAR)
CallNative("IS_CHAR_IN_ANY_BOAT")
if (GetIntResult() == 1) then
return 0
else
PushInt(PLAYER_CHAR)
CallNative("IS_CHAR_SITTING_IN_ANY_CAR")
return GetIntResult()
end
end
end
end

function front()
 PushInt(PLAYER_CHAR)
 PushVarPtr()
 CallNative("GET_CAR_CHAR_IS_USING")
 PLAYER_CAR = GetIntParam(1)
PushInt(PLAYER_CAR)
PushInt(5)
CallNative("OPEN_CAR_DOOR")
end

function back()
 PushInt(PLAYER_CHAR)
 PushVarPtr()
 CallNative("GET_CAR_CHAR_IS_USING")
 PLAYER_CAR = GetIntParam(1)
PushInt(PLAYER_CAR)
PushInt(4)
CallNative("OPEN_CAR_DOOR")
end

function close()
PushInt(PLAYER_CAR)
CallNative("CLOSE_ALL_CAR_DOORS")
end

function main()
InitScript()
while true do
 WaitForPlayerPoolCreation()
    WaitForValidPlayer()
    if (IsKeyPressed(34) == 1) then
     if (PlayerIsInCar() == 1) then
front()
Wait(300)
end
end
    if (IsKeyPressed(33) == 1) then
     if (PlayerIsInCar() == 1) then
back()
Wait(300)
end
end
    if (IsKeyPressed(35) == 1) then
     if (PlayerIsInCar() == 1) then
close()
Wait(300)
end
end

Wait(300)
end
end

-- start
main();


*this one is rock study and bullet proof ^^

feedback ppl! that_guy2057_evilgrin.gif

shakemakee1
  • shakemakee1

    Player Hater

  • Members
  • Joined: 31 Dec 2008

#2

Posted 05 January 2009 - 03:42 PM

Thanks man, but what file should I edit?
(I'm talking about "No telepatic Police")

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#3

Posted 05 January 2009 - 03:46 PM

oh i did forgot to mention it was LUA based mod blush.gif
install Alice and create a blank file in Alice folder, copy each script to file and save as .LUA extension

sry...
opening the hood helps avoid windshield bullets lol.gif try that aswell

Intosia
  • Intosia

    I'm random! ^^

  • Members
  • Joined: 11 Dec 2008

#4

Posted 05 January 2009 - 04:22 PM

Nice, always wondered why nobody used teh Multiplier smile.gif

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#5

Posted 05 January 2009 - 05:51 PM

lol when set to 0.3 it took me an hour to get 5 stars... ^_^

i think its balanced on 0.4/0.55

The0
  • The0

    Rat

  • Members
  • Joined: 17 Dec 2008

#6

Posted 05 January 2009 - 06:50 PM

Cool, I'll try the hood one when I get home.

The police one I would get if I hadn't realized something a while ago. I also thought it was weird that the cops seemed telepathic at one point, until I saw a ped dial 911 after I killed his friend and I realized "they're not psycic, people are just calling 911 in response to your actions." I, for one, think that is really cool and I wouldn't want to change it.

187monk
  • 187monk

    Player Hater

  • Members
  • Joined: 07 Dec 2008

#7

Posted 05 January 2009 - 08:13 PM

Nice Thanks ! biggrin.gif

Killuminati91
  • Killuminati91

    Brucie

  • Members
  • Joined: 28 Nov 2008

#8

Posted 05 January 2009 - 08:24 PM

2nd one = critical error for me

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#9

Posted 05 January 2009 - 08:56 PM

yeah i need to add another IF for damaged or not dont feel like... im working on 1st person mod =]

topeira
  • topeira

    Playa

  • Members
  • Joined: 16 Jun 2005

#10

Posted 05 January 2009 - 09:54 PM

hippie, can u explain please what is really happening (what's changed) with the cops mod?

how did the cops used to know where u r firing from in the stock files?

what did u change? how is their behavior different now? did they have a spawning radius around your location which u removed?

also, what is this multiplaier u where talking about? 0.3? 0.4\0.55? what's that?

im jsut curious on what to expect from this mod or even from the stock police "crime recognition behavior"...

HippieCommunist
  • HippieCommunist

    PWR2DPPL

  • Members
  • Joined: 25 Jan 2003

#11

Posted 05 January 2009 - 10:40 PM

QUOTE (topeira @ Jan 5 2009, 21:54)
PushFloat(0.6)
CallNative("SET_WANTED_MULTIPLIER")

this one...

Intosia
  • Intosia

    I'm random! ^^

  • Members
  • Joined: 11 Dec 2008

#12

Posted 05 January 2009 - 10:41 PM

QUOTE (The0 @ Jan 5 2009, 18:50)
Cool, I'll try the hood one when I get home.

The police one I would get if I hadn't realized something a while ago. I also thought it was weird that the cops seemed telepathic at one point, until I saw a ped dial 911 after I killed his friend and I realized "they're not psycic, people are just calling 911 in response to your actions." I, for one, think that is really cool and I wouldn't want to change it.

True, and makes sence knowing the gametimes is faster. Although, i dont like it... the gametime is a pain in the ass to sometimes... To slower game time and slower cop responces would be cool smile.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users