IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (31) « First ... 22 23 [24] 25 26 ... Last »  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 [GTA SA] ~ CLEO Script Tutorial ~

 
Michael-Knight1  
Posted: Friday, Aug 24 2012, 14:06
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (ZAZ @ Friday, Aug 24 2012, 12:40)
QUOTE (Michael-Knight1 @ Thursday, Aug 23 2012, 16:09)
Hi Zaz , I Need Help into my kitt prison break on main script . i don't knew why the game crashed when i get spawned from the jail ?? Here is the codes !


280 isn't a pedtype as i mentioned in earlier post

don't use the actors handle after removing their reference
CODE
Actor.RemoveReferences($COPBUSTEDPED1_LS)
Actor.RemoveReferences($COPBUSTEDPED2_LS)
Car.RemoveReferences($COPBUSTEDCAR_LS)
05E2: AS_actor $COPBUSTEDPED1_LS kill_actor $PLAYER_ACTOR
05E2: AS_actor $COPBUSTEDPED2_LS kill_actor $PLAYER_ACTOR


your script then don't crash, you will just get a black screen because you did a fade but didn't fade back

every crashed ??
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Friday, Aug 24 2012, 14:54
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Michael-Knight1 @ Friday, Aug 24 2012, 15:06)
QUOTE (ZAZ @ Friday, Aug 24 2012, 12:40)
QUOTE (Michael-Knight1 @ Thursday, Aug 23 2012, 16:09)
Hi Zaz , I Need Help into my kitt prison break on main script . i don't knew why the game crashed when i get spawned from the jail ?? Here is the codes !


280 isn't a pedtype as i mentioned in earlier post

don't use the actors handle after removing their reference
CODE
Actor.RemoveReferences($COPBUSTEDPED1_LS)
Actor.RemoveReferences($COPBUSTEDPED2_LS)
Car.RemoveReferences($COPBUSTEDCAR_LS)
05E2: AS_actor $COPBUSTEDPED1_LS kill_actor $PLAYER_ACTOR
05E2: AS_actor $COPBUSTEDPED2_LS kill_actor $PLAYER_ACTOR


your script then don't crash, you will just get a black screen because you did a fade but didn't fade back

every crashed ??

no, i didn't got any crash, i edited first big mistakes

pedtype 280 is wrong, doesn't matter if it crash or not

i didn't tested actors handle after removing their reference because it's wrong, wrong, wrong, wrong, wrong
Users WebsitePM
  Top
 

 
Michael-Knight1  
Posted: Friday, Aug 24 2012, 15:09
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (ZAZ @ Friday, Aug 24 2012, 14:54)
QUOTE (Michael-Knight1 @ Friday, Aug 24 2012, 15:06)
QUOTE (ZAZ @ Friday, Aug 24 2012, 12:40)
QUOTE (Michael-Knight1 @ Thursday, Aug 23 2012, 16:09)
Hi Zaz , I Need Help into my kitt prison break on main script . i don't knew why the game crashed when i get spawned from the jail ?? Here is the codes !


280 isn't a pedtype as i mentioned in earlier post

don't use the actors handle after removing their reference
CODE
Actor.RemoveReferences($COPBUSTEDPED1_LS)
Actor.RemoveReferences($COPBUSTEDPED2_LS)
Car.RemoveReferences($COPBUSTEDCAR_LS)
05E2: AS_actor $COPBUSTEDPED1_LS kill_actor $PLAYER_ACTOR
05E2: AS_actor $COPBUSTEDPED2_LS kill_actor $PLAYER_ACTOR


your script then don't crash, you will just get a black screen because you did a fade but didn't fade back

every crashed ??

no, i didn't got any crash, i edited first big mistakes

pedtype 280 is wrong, doesn't matter if it crash or not

i didn't tested actors handle after removing their reference because it's wrong, wrong, wrong, wrong, wrong

ok , i'll try a gain
Users WebsitePM
  Top
 

 
Michael-Knight1  
Posted: Sunday, Sep 16 2012, 17:33
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



ZAZ , i need help about the f*cking fade devil.gif
i don't know why when i use it everytime , he did not stop sneaky2.gif , help .. this is Example icon14.gif
the game still black without end
CODE

{$CLEO}

0000: NOP

while true
repeat
wait 0 ms
until 0256:   player $PLAYER_CHAR defined
016A: fade 0 time 1000
wait 1000
end
Users WebsitePM
  Top
 

 
SilentPL  
Posted: Sunday, Sep 16 2012, 17:46
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




Just use it properly and it will work fine icon14.gif

Why looping it?
Users WebsitePMMSNXbox Live
  Top
 

 
Michael-Knight1  
Posted: Sunday, Sep 16 2012, 17:58
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (SilentPL @ Sunday, Sep 16 2012, 17:46)
Just use it properly and it will work fine icon14.gif

Why looping it?

just write example of fade code ...

I'll Going To Try , Thanks icon14.gif

This post has been edited by Michael-Knight1 on Sunday, Sep 16 2012, 18:03
Users WebsitePM
  Top
 

 
XzibitusaK  
Posted: Tuesday, Oct 2 2012, 18:02
Quote Post


Player Hater
Group Icon
Group: Members
Joined: May 1, 2012

cz.gif

XXXXX



ZAZ I want to thank you for your cleo tutorials...

THANK YOU !
Users WebsitePM
  Top
 

 
TLFdjobaw  
Posted: Sunday, Oct 7 2012, 03:29
Quote Post


Un-skilled Collisions Modders
Group Icon
Group: Members
Joined: Jan 20, 2012

in.gif

XXXXX



hi ZAZ.. i was make a dance script with custom ifp... but i want the player character can dancing with the homies.. what opcodes should i use???? confused.gif
Users WebsitePM
  Top
 

 
Michael-Knight1  
Posted: Sunday, Oct 7 2012, 09:09
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



Hi Zaz , I make the demo mission of my knight rider back to school v 2.0 , KITT VS GOLIATH but i don't know why the game crashed after jump to label @DEMO2_789 ?? Help Please Now

EDIT : Nevermind


This post has been edited by Michael-Knight1 on Sunday, Oct 7 2012, 12:43
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Monday, Oct 8 2012, 15:05
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award






QUOTE (XzibitusaK @ Tuesday, Oct 2 2012, 19:02)
ZAZ I want to thank you for your cleo tutorials...

THANK YOU !

You're welcome. Nice to get feedback from someone who understood the lessons.


QUOTE (TLFdjobaw @ Sunday, Oct 7 2012, 04:29)
hi ZAZ.. i was make a dance script with custom ifp... but i want the player character can dancing with the homies.. what opcodes should i use???? confused.gif

Let him do Animations of DANCING.ifp or STRIP.ifp



This post has been edited by ZAZ on Monday, Oct 8 2012, 15:08
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Monday, Oct 8 2012, 15:06
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




doublepost blush.gif

This post has been edited by ZAZ on Monday, Oct 8 2012, 15:09
Users WebsitePM
  Top
 

 
Michael-Knight1  
Posted: Monday, Oct 8 2012, 15:25
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



Zaz how can i make actor follow player and can join The interior wich the player enter it bored.gif
Users WebsitePM
  Top
 

 
ZAZ  
Posted: Monday, Oct 8 2012, 17:08
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




QUOTE (Michael-Knight1 @ Monday, Oct 8 2012, 16:25)
Zaz how can i make actor follow player and can join The interior wich the player enter it  bored.gif

check if interior isn't 0, then get interior and coords from one meter infront of player, then put and link actor to interior
Users WebsitePM
  Top
 

 
Michael-Knight1  
Posted: Monday, Oct 8 2012, 18:10
Quote Post


Never Give UP
Group Icon
Group: Members
Joined: Jul 8, 2012

gr.gif

XXXXX



QUOTE (ZAZ @ Monday, Oct 8 2012, 17:08)
QUOTE (Michael-Knight1 @ Monday, Oct 8 2012, 16:25)
Zaz how can i make actor follow player and can join The interior wich the player enter it  bored.gif

check if interior isn't 0, then get interior and coords from one meter infront of player, then put and link actor to interior

Thanks As Always icon14.gif
Users WebsitePM
  Top
 

 
ashwinsjaganaath  
Posted: Wednesday, Oct 24 2012, 05:33
Quote Post


Learner
Group Icon
Group: Members
Joined: Oct 23, 2012

ia.gif

XXXXX



Hello Zaz, first off thanks a billion for these tutorials. It is very easy to understand and i was able to do small cleo scripts from ur tutorials right when i started learning them which i never dreamed of doing all these years.
I have a doubt abt cleo scripts. Is it possible to create multi-threads in a single cleo script? if that's not possible how can i obtain the value of a variable declared in one cleo script from another one? i saw ur tutorial abt this special cleo global variable but didn't quite get it. I'd be grateful if u could explain me the same. Thank you once again for ur tutorials. smile.gif
PM
  Top
 

 
SilentPL  
Posted: Wednesday, Oct 24 2012, 14:14
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




QUOTE (ashwinsjaganaath @ Wednesday, Oct 24 2012, 07:33)
I have a doubt abt cleo scripts. Is it possible to create multi-threads in a single cleo script? if that's not possible how can i obtain the value of a variable declared in one cleo script from another one? i saw ur tutorial abt this special cleo global variable but didn't quite get it. I'd be grateful if u could explain me the same. Thank you once again for ur tutorials. smile.gif

You can, but it's almost always obsolete to do so. Could you explain the reason you want a multi-threaded script?
Users WebsitePMMSNXbox Live
  Top
 

 
ZAZ  
Posted: Wednesday, Oct 24 2012, 17:19
Quote Post


Kernlochbohrer
Group Icon
Group: Members
Joined: Jan 10, 2005

eu.gif

Member Award




I confirm to SilentPL
but you can find the answer for your question here
Users WebsitePM
  Top
 

 
ashwinsjaganaath  
Posted: Wednesday, Oct 24 2012, 18:45
Quote Post


Learner
Group Icon
Group: Members
Joined: Oct 23, 2012

ia.gif

XXXXX



@Zaz and @SilentPL : Thanks for the quick response. Actually i was thinking of creating a small script whereby the player creates a series of explosion on punching. I succeeded in doing so, the player did create a series of explosions in front of him. But that seemed so dangerous cuz if u wanna punch normally without any explosions u wouldn't be able to. So i thought of making the script to execute on entering a cheat. Enter a cheat and this mode gets activated and enter it again to deactivate it. I created another script to do the same. I understood the usage of special cleo global variables(finally! phew) and i used it to link both the scripts. The idea was whenever the player punches the script checks for the value of a particular variable, which is defined by that another script which activates(variable value = 1) and deactivates (variable value = 0). So the script(the one that creates explosions) reads the variable value and it will proceed only if the variable value is 1 or else it will loop back to the first line and wait(forever) until the value becomes 1. THIS ACTUALLY WORKED IN GAME. But my doubt now is : i have used the opcode 0AB3: var 0 = 0, will this line affect any other scripts using var 0? if it does i know that i can use some other say var 2 or 3 or 146 or whatever to avoid the confusion. But lets say, if i share this mod with some others, i can't expect them to change their var # to be able to work this script, right? And i wouldn't know which var # is unused by everyone .

And for the same reason, is it possible to use any base memories to make the script check whether the cheat is on or off?

and here is how my script works and this is the way i want it to work without any confusions with that var 0 thing

YouTube video

http://www.youtube.com/watch?v=zYyl54ED8DU

Thanks a bunch

P.s : Shall i also share the lines that i wrote in both of the above-mentioned scripts?

This post has been edited by ashwinsjaganaath on Wednesday, Oct 24 2012, 18:51
PM
  Top
 

 
SilentPL  
Posted: Wednesday, Oct 24 2012, 19:43
Quote Post


Senior File Manager
Group Icon
Group: Members
Joined: Feb 1, 2010

pl.gif

Member Award




You made that sound really complex, but I'm pretty sure you can merge this into one script with ease. Mind showing us the codes?
Users WebsitePMMSNXbox Live
  Top
 

 
ashwinsjaganaath  
Posted: Wednesday, Oct 24 2012, 19:52
Quote Post


Learner
Group Icon
Group: Members
Joined: Oct 23, 2012

ia.gif

XXXXX



QUOTE (SilentPL @ Wednesday, Oct 24 2012, 19:43)
You made that sound really complex, but I'm pretty sure you can merge this into one script with ease. Mind showing us the codes?

Oh for sure man here it is

CODE

//Buddha's palm

{$CLEO .cs}

//Start of thread
thread 'Buddha'

:Buddha_0
wait 0
00D6: if
0256:   player $PLAYER_CHAR defined
jf @Buddha_0
00D6: if or
02D8:   actor $PLAYER_ACTOR current_weapon ==  0
02D8:   actor $PLAYER_ACTOR current_weapon ==  1
jf @Buddha_0
0AB4: 0@ = var 0 // - cleo 3 -
00D6: if and
00E1:   player 0 pressed_key 17
0039:   0@ == 1  
jf @Buddha_0

:Buddha_1
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 2.0 0.2
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 6.0 0.2
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.2
04C4: store_coords_to 10@ 11@ 12@ from_actor $PLAYER_ACTOR with_offset 0.0 14.0 0.2
04C4: store_coords_to 13@ 14@ 15@ from_actor $PLAYER_ACTOR with_offset 0.0 18.0 0.2
02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1
020C: create_explosion_with_radius 5 at 1@ 2@ 3@
wait 200 ms
020C: create_explosion_with_radius 5 at 4@ 5@ 6@
wait 200 ms
020C: create_explosion_with_radius 5 at 7@ 8@ 9@
wait 200 ms
020C: create_explosion_with_radius 5 at 10@ 11@ 12@
wait 200 ms
020C: create_explosion_with_radius 5 at 13@ 14@ 15@
02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0
wait 1000 ms
jump @Buddha_0


This is the script that creates the explosion while he is punching
and the script that activates the cheat is as follows

CODE

{$CLEO .cs}

//Cheat
thread 'Buddha1'

:Buddha1_0
wait 0
00D6: if
0256: player $PLAYER_CHAR defined
jf @Buddha1_0
0A8D: 1@ = read_memory 0x00969110 size 4 virtual_protect 0// - cleo 3 -
0A8D: 2@ = read_memory 0x00969114 size 2 virtual_protect 0// - cleo 3 -
00D6: if
04A4:   1@ == 0x44444841
04A4:   2@ == 0x4255
jf @Buddha1_0
03E5: show_text_box 'CHEAT1'
0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0// - cleo 3 -
0A8C: write_memory 0x00969114 size 2 value 0 virtual_protect 0// - cleo 3 -
0AB3: var 0 = 1
jump @Buddha1_1

:Buddha1_1
wait 0
00D6: if
0256: player $PLAYER_CHAR defined
jf @Buddha1_1
0A8D: 1@ = read_memory 0x00969110 size 4 virtual_protect 0// - cleo 3 -
0A8D: 2@ = read_memory 0x00969114 size 2 virtual_protect 0// - cleo 3 -
00D6: if
04A4:   1@ == 0x44444841
04A4:   2@ == 0x4255
jf @Buddha1_1
03E5: show_text_box 'CHEAT8'
0A8C: write_memory 0x00969110 size 4 value 0 virtual_protect 0// - cleo 3 -
0A8C: write_memory 0x00969114 size 2 value 0 virtual_protect 0// - cleo 3 -
0AB3: var 0 = 0
jump @Buddha1_0


And as u might've seen in the video, these are the scripts that got the explosions to work.
My head is spinning around man, thinking of how to merge these without using var 0. No wonder i sounded complicated earlier, i'm not able to think straight. I'm sure u will have a simple clean solution to this. Anyway i'm not too bad for the first script i guess, am i?

This post has been edited by ashwinsjaganaath on Wednesday, Oct 24 2012, 19:59
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Pages: (31) « First ... 22 23 [24] 25 26 ... Last »

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG