You are not logged in.
Pages: 1
Anyone ... ?
Sorry for my topic's rush guys but i have a stupid problem
I just want to make the player go +90.0 m up and + 25.0 in front but it doesnt work !
This is not all the script but here it doesn't works ,it goes forward but not up (in air) !
wait 0
if and
0AB0: key_pressed 9
0AB0: key_pressed 87
0819: 0@ = actor $PLAYER_ACTOR distance_from_ground
0@ > 5.0
jf @swing_1
0992: set_player $PLAYER_CHAR weapons_scrollable 0
0812: AS_actor $PLAYER_ACTOR perform_animation "DROWN" IFP_file "PED" 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time 500 // versionB
0393: actor $PLAYER_ACTOR perform_animation "DROWN" at 0.01 times_normal_rate
wait 25
0614: set_actor $PLAYER_ACTOR animation "DROWN" progress_to 0.20
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 25.0 0.0
0063: 4@ -= 1@ // (float)
0063: 5@ -= 2@ // (float)
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 4@ 5@ 90.0
0612: set_actor $PLAYER_ACTOR animation "DROWN" paused 1
.............
Please help !
Thanks for the codes guys,il try them out and reply if it works.
Can somebody tell me how to create a timer in a costum mission ?
I want it to have a time to complete the mission or else you fail and second , just show how much time it took for the mission to complete?
Please i need both of them (i created a sphere i just need the timer)
Thank you ,could you also help me with the second one please ,or anyone here?
Could anyone edit this image and write where's x y and z or - x -y and -z ?
I really need this....
http://tinypic.com/r/8yhtfp/6
And i have a problem ,when i want the actor to perform a animation in air ,and move 10 m forward .It moves but like a magnet ,if i turn around it still goes that location ,i mean it doesn't go in front of the player ,it goes in "the map" forward .I don't know how to explain it .
How to move the actor forward ? like
if and
key pressed...
actor in air
as actor perform animation.....
set velocity to (i want to always go forward but i can't )
Hep please with both of these ,really need it
I think beacause there's no color 0
So could you please tell me about the 0A8C: write_memory 7600773 size 1 value 72 virtual_protect 1
and etc. ?
Please?
Wow dammit ,i must be the luckyest guy on earth....i tryed again but no effect ,guess im stuck with this ah
The add money still crashes ! i tryed changing the key to ; but it crashesm ...Why ?
I copied your script .
Can you also tell me why you used repeat?
Ok thanks allot for this il try and do some testing with what you wrote if il understand ,(I hope it's in cleo ,cs)
Can you tell me what's wrong with this ?
{$CLEO .cs}
wait 0
:addmoney
wait 0
if
0256: player $PLAYER_CHAR defined
jf @addmoney
:addmoney_2
wait 0
if
0AB0: key_pressed 114
0109: player $PLAYER_CHAR money += 1000
wait 1000
jump @addmoney
if player presses f3 then it gives + 1000 money then stop and possible to do again but this crashes what's wrong ?
And please tell me what do all imunities mean where can i get them ??
for player car :BP FP etc.
Also could you explain me how to use write_memory and what i wrote there?
Thanks
what does write memory do?virtual protect etc. read memory ? How do i use it ?Any example for it ?
And what does this do ?
0@ get value of 1.parameter
1@ get value of 2.parameter
2@ get value of 3.parameter
3@ get value of 4.parameter
4@ get value of 5.paramete
examples ?
I asked a friend to correct my infinite ammo script wich is this
{$CLEO .cs}
:infiniteammo_0
0001: wait 0 ms
:infiniteammo_10
0001: wait 0 ms
:infiniteammo_20
0001: wait 0 ms
00D6: if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @infiniteammo_10
00D6: if
0AB0: key_pressed 145
004D: jump_if_false @infiniteammo_20
017B: set_actor $PLAYER_ACTOR weapon 1 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 2 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 3 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 4 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 5 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 6 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 7 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 8 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 9 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 10 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 11 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 12 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 13 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 14 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 15 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 16 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 17 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 18 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 19 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 20 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 21 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 22 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 23 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 24 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 25 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 26 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 27 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 28 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 29 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 30 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 31 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 32 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 33 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 34 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 35 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 36 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 37 ammo_to 9999
017B: set_actor $PLAYER_ACTOR weapon 38 ammo_to 9999
:infiniteammo_30
0001: wait 1000 ms
00D6: if
0AB0: key_pressed 145
017B: set_actor $PLAYER_ACTOR weapon 1 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 2 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 3 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 4 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 5 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 6 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 7 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 8 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 9 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 10 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 11 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 12 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 13 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 14 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 15 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 16 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 17 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 18 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 19 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 20 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 21 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 22 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 23 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 24 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 25 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 26 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 27 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 28 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 29 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 30 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 31 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 32 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 33 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 34 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 35 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 36 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 37 ammo_to 0
017B: set_actor $PLAYER_ACTOR weapon 38 ammo_to 0
0002: jump @infiniteammo_20
and he corected me to this:
{$CLEO .cs}
wait 0
:infiniteammo
wait 0
if
0256: player 0 defined
jf @infiniteammo // jf == jump_if_false
if
0AB0: 145 // scroll lock btn
jf @infiniteammo2
0A8C: write_memory 7600773 size 1 value 144 virtual_protect 1
0A8C: write_memory 7600815 size 1 value 144 virtual_protect 1
0A8C: write_memory 7600816 size 2 value 37008 virtual_protect 1
0A8C: write_memory 7612591 size 1 value 144 virtual_protect 1
0A8C: write_memory 7612646 size 1 value 144 virtual_protect 1
0A8C: write_memory 7612647 size 2 value 37008 virtual_protect 1
:infiniteammo2
wait 1000
if
0AB0: 145
jf @infiniteammo2
0A8C: write_memory 7600773 size 1 value 72 virtual_protect 1
0A8C: write_memory 7600815 size 1 value 255 virtual_protect 1
0A8C: write_memory 7600816 size 2 value 3150 virtual_protect 1
0A8C: write_memory 7612591 size 1 value 72 virtual_protect 1
0A8C: write_memory 7612646 size 1 value 255 virtual_protect 1
0A8C: write_memory 7612647 size 2 value 3150 virtual_protect 1
jump @infiniteammo
Feel free to help me with something more ,could you explain this better with more examples please?
write_memory means a change of a memory location. In this case, there are given infinite ammo. I'm sorry, but with such issues is best addressed by an official forum sanny builder. I will answer only to some
Quote
3.What's a integer ?How do you use it ?Example ?
00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
0172: 1@ = actor $PLAYER_ACTOR Z_angle
1@ 2@ 3@ = integer
Quote
4.What does FLOAT do ?Example ?
010B: 4@ = player $PLAYER_CHAR money
0470: 4@ = actor $PLAYER_ACTOR current_weapon
077E: get_active_interior_to 4@
4@ = float
//
In SA some values are integers, some - floats.
Quote
5.What is OFFSET ? How do i use it ?Example ?
Offset is a variable of the actor, object, transport...
046C: 1@ = car 2@ driver
01B9: set_actor 2@ armed_weapon_to 4@
1@, 2@, 4@ = offsets.
example, create a pedestrian in front of the player. Its Offset is 2@. Then give him a weapon.
First create offset coordinates. The first variable is the position of X, second Y, third Z of the player.
Instead of the offset can write any position and remove 04C4, then it will create not before the player, but at a given point on the map.
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 3.0 1.0
009A: 2@ = create_actor_pedtype 4 model #MALE01 at 1@ 2@ 3@
01B2: give_actor 2@ weapon 31 ammo 60
You must first download the model weapons by command 0247: load_model #M4, but these weapons do not necessarily, it is loaded with the start of the game.
------------------------
Please help me with this ,keep in mind that im not a scripter and i don't know even the basics of cleo good .
Desperate for help
Ok thanks allot for the info ,i think il better wait...
well thanks for that code , can you make a tutorial in your free time ? wich explains all the things? I didn't understand why you put while true thing ,and repeated i didn't practicaly understand 99% of that code instead of perform_animation_sequence.....wich its obvious ...Il wait even months but please help out a newbie or i don't know anybody else feel free to make a good tutorial.
Thanks in advance for all your help
look i tried to make him perform a animation but it doesnt work what's wrong ?
{$CLEO .cs}
:WALLDEMO
03A4: name_thread "WALLDEMO"
wait 1000
01B4: set_player $PLAYER_CHAR can_move 1
if
0AB0: key_pressed 0x10
then
0393: $PLAYER_CHAR perform_animation "POOL_SHORT_SHOT" at 1@ times_normal_rate
end
0A93: end_custom_thread
also where can i find a list of animations he can perform and all the list of commands and what does it do ?
How to move a player up while running ,can you also help me with the things i posted up?
And i beg you,can you make a tutorial on cleo ?
Well yeah it starts with {$CLEO} but what is player-actor or player_char ? whats the difference betwen them ?
If i want to make something like
if variable a =1
and in front is a solid object
then move player up a with runhning speed and running animation
and if there's no more object in front then jump in front
or if the player falls from x metters shake the screen etc.
Isn't all this scripting like if x is pressed and f=0 then do that etc. ?
I wan't to recreate the parkour mod i posted but i don't want to look at that file beacause i don't understand shit .
Or for example ,how to make the player ,camera?
I want to learn all about it but there's no place for it and zaz tutorial is a too advanced for me ,i need so much help
I wanted to say cleo scripting but isn't that the same you just add the {CLEO.CS} thinghy ? Can you make a tutorial for it please ? Or anybody ? Wich explains all a beginner needs to know and maybe even more...?
I want cleo beacause it works in sa-mp too
edit(my map crashes if you stand on something ,i think you were flying there)
I checked the tutorials allot and i don't understand a thing ,now i really want to learn how to script can anybody make a better tutorial like all the are variable , integrers functions more detailed description etc. and wich covers most of codding ? I was serious about never writing a line of code in my life.The articles in sannybuilder is confusing and mos of the tutorials.They start like you already know how to script
For example:
// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007
DEFINE OBJECTS 389
DEFINE OBJECT SANNY BUILDER 3.03
DEFINE OBJECT INFO // Object number -1
DEFINE OBJECT KEYCARD // Object number -2
DEFINE OBJECT AD_FLATDOOR // Object number -3
DEFINE OBJECT KB_BANDIT_U // Object number -4
etc...
As you can see it defines the objects that will be used in the main.scm, there is 389 of them like said on top (DEFINE OBJECTS 389). To add an object just go to to last one and add yours.
It doesn't say what is defining a object ,why is defining a object they just told you can add one of yours .
I'l thank all my life for a full tutorial ,am i really lost and can't learn SB scripting ?
Not necesarily in MED ,both in MED and MTA race ditor ! that just sucks...
here look at this map ,the location is on the highest building is san andreas on top ,you know where's the parachute .This map is for a parkour mod that i didn't make and that's why you can't parkour properly beacause that mod has wallrun wallstop etc http://www.youtube.com/watch?v=S2-fEMG0JQU
with or without the mod it crashes ,and it crashes on certain areas . Look on it a bit and tell me what's wrong beacause i don't get it...i want to use dyom to make parkour missions but what to do with dyom if even the simple sa crashes ?? The map is like 5% completed but if it crashes like this i can't make it .
I really don't know whats wrong ,it crashed like 40 times and everytime i tryed to edit so it wont crash but the same .
Too bad there is no "FULL" tutorial anywhere ...And if you do something wrong in MED it crashes while playing or on the loading screen ,and you will never know what is wrong beacause it just crashes ,at least if it had a log and told each object is the problem .You have to start all over...
Thanks for responding
Cal someone make a in-game map editor with cleo ,like when you aim at something you can edit and to add object press a key ? You could use the pistol to spawn objects and the num keys for more advanced stuff ...And organise obj in categories.
And it would be aweosome to save as ipl but if there is no way ,just to save as any file ...but save !
Im asking this beacause i tryed using MED and mta race map editor and they both crash allot ....If someone could make this it would be aweosome ,i want to make a parkour map and im hopeless ...I know this stuff takes allot to do but il do anything for it ...
Also i really can't script ,i suck at math and never wrote a line of code in my whole life , i tryed to learn but i don't understand a thing .Please help me out...
ps like the planter mod but more advanced and with save so you could actualy test your map in realtime !
Pages: 1