#1 04-07-2010 22:26

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

All Vehicles Pay'n'Spray

[center][large]All Vehicles Pay'n'Spray[/large][/center]

A very simple CLEO Script allowing you to take any vehicle to the Pay'n'Spray.


Download
Source

So simple I forget why I bothered uploading source. You can get the same by decompile.


I would like to thank Seemann for showing the method of doing it via .exe edit and the way to enable radio for police vehicles, too. Information that I wanted loads at the time and what gave me the idea to create this.

Last edited by Deji (04-07-2010 22:29)

Offline

#2 05-07-2010 06:56

Seemann
Registered: 07-08-2006
Posts: 2,153

Re: All Vehicles Pay'n'Spray

smile

No need for 0000, btw

Last edited by Seemann (05-07-2010 08:13)

Offline

#3 05-07-2010 20:40

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Re: All Vehicles Pay'n'Spray

Yeah, just updated that a few minutes ago tongue

Offline

#4 06-07-2010 11:25

Seemann
Registered: 07-08-2006
Posts: 2,153

Re: All Vehicles Pay'n'Spray

0A8C: write_memory 0x44AC75 size 5 value 0x90 virtual_protect 1

how it's supposed to work? 0A8C accepts only 1, 2 or 4 for the 'size' parameter. Any other number turns to 4 as default value.

Offline

#5 06-07-2010 12:17

Silent
Registered: 08-05-2010
Posts: 29

Re: All Vehicles Pay'n'Spray

I've told him that already at gtaforums tongue

Offline

#6 06-07-2010 13:09

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Re: All Vehicles Pay'n'Spray

This is being discussed here. I don't know and I never expected it to work but it seems to work fine... So I'm planning on leaving it as is until there is a noticable issue caused by it, which could maybe explain why it worked.

Any other number turns to 4? If I write 4, the game crashes on enter of the Pay'n'Spray... Jump false function is only half NOP'd... I'm trying to figure out the rest of this at the moment.

Offline

#7 06-07-2010 13:13

Alien
Registered: 12-10-2008
Posts: 564

Re: All Vehicles Pay'n'Spray

Seemann wrote:

how it's supposed to work? 0A8C accepts only 1, 2 or 4 for the 'size' parameter. Any other number turns to 4 as default value.

In CLEO 4, if set size, different from 1, 2 or 4, opcode 0A8C performs the 'memset' operation (fills block of memory with low byte of the value). For compatibility with CLEO 3 it is better to rewrite this script:

0A8C: write_memory 0x44AC75 size 4 value 0x90909090 virtual_protect 1
0A8C: write_memory 0x44AC79 size 1 value 0x90 virtual_protect 1

Offline

#8 06-07-2010 13:28

Deji
From: UK
Registered: 09-11-2008
Posts: 189
Website

Re: All Vehicles Pay'n'Spray

I'm correcting all mistakes in one bout with..

0A8C: write_memory 0x44AC7D size 4 value 0x90909090 virtual_protect 1

Reason explained here.

I assumed some CLEO 4 thing might have been helping here. I was just waiting to hear whether someone using CLEO 3 would have a crash.

*Updated* (probably for the last time)

Offline

#9 06-07-2010 13:43

Seemann
Registered: 07-08-2006
Posts: 2,153

Re: All Vehicles Pay'n'Spray

Well, after exploring how 0A8C works in CLEO 4 I must say it's ok to write a code like this. For the values above 4 Alien uses a routine that allows to fill a memory block with the given value. In this case it's 0x90 repeating 5 times from 0x44AC75 to 0044AC7A.

But CLEO 3 will rewrite only 4 first bytes, leaving 0044AC7A untouched. So it may cause unexpected consequences. blush

madrolleyes Alien forestalled me


edit2: I confirm that the original script crashes with CLEO 3 when respraying.

Last edited by Seemann (06-07-2010 13:53)

Offline

Board footer

Powered by FluxBB