CLEO Help Sending a message to the server

CLEO related
Status
Not open for further replies.

moadif

Member
Joined
Apr 17, 2013
Messages
11
Reaction score
0
Hey,
I've been trying to write a simple script where it sets your position somewhere and then sends a message (something like samp say_msg or whatever it is) but sadly I'm having a difficulty getting it to work properly
I basically need a method to send a message/server command without samp funcs, for some reason sampfunctions crashes my client I've pretty much tried everything there's no way around(if you know how to solve it that'd be great)

So my question is, is there a way to send a message to the server without samp functions? 
 

moadif

Member
Joined
Apr 17, 2013
Messages
11
Reaction score
0
Alright so I've managed to get Sampfuncs to work, however after this code is executed(requirement for samp say_msg I heard)
Code:
if 
  8AF7: get_samp_base_to 0@
then 
    0A93: end_custom_thread
end
repeat 
0001: wait 400
until 0AFA: is_samp_structures_available

the client crashes again and I get this error
Code:
SA-MP 0.3z
Exception At Address: 0x00486DDF
Base: 0x03000000

Registers:
EAX: 0x00030000	EBX: 0x00000000	ECX: 0x03000000	EDX: 0x03FD6060
ESI: 0x00000000	EDI: 0x0B604E30	EBP: 0x00000100	ESP: 0x0022FCF8
EFLAGS: 0x00010246

Stack:
+0000: 0x0B604E30   0x040CDCF8   0x0046A201   0x00000001
+0010: 0x4544414D   0x20594220   0x00505946   0x00000000
+0020: 0x00000000   0x00000000   0x00000000   0x040CDCF8
+0030: 0x040CDCF8   0x0046A201   0x00000001   0x00469759
+0040: 0x00000101   0x0B604E30   0x040CDCF8   0x0046A201
+0050: 0x00000001   0x0B604E30   0x040CDCF8   0x0046A201
+0060: 0x00000001   0x725E45AE   0x725E4665   0x00000001
+0070: 0x650F1317   0x040CDCF8   0x00000001   0x651089C9
+0080: 0x00000001   0x0022FF78   0x00837DD9   0xFFFFFFFF
+0090: 0x00469FF7   0x00000100   0x040CDCF8   0x00000000
+00A0: 0x0046A220   0x00000001   0x00863B10   0x76BF80E0
+00B0: 0x00000000   0x00000000   0x00863B10   0x0156561A
+00C0: 0x00A49960   0x0053BCCE   0x0000000A   0x0053E593
+00D0: 0x00863B10   0x00748D00   0x7668CF41   0x00000000
+00E0: 0x0022FF88   0x7FFDF000   0x01690000   0x00000008
+00F0: 0x01691E98   0x00000008   0x00000100   0x00000008
+0100: 0x00000102   0x44700000   0x44070000   0x00000000
+0110: 0x00000000   0x00000780   0x00000438   0x00000000
+0120: 0x0022FE54   0x002004CA   0x00000113   0x00004242
+0130: 0x00000000   0x01CCDADD   0x000003C0   0x0000021C
+0140: 0x0000002C   0x0022FE2C   0x00825EA4   0x7668CF41
+0150: 0x00000000   0x7FFDF000   0xFFFFFFFF   0x00821D17
+0160: 0x00000065   0x00000065   0x0022FF88   0x008246F1
+0170: 0x00400000   0x00000000   0x017C248F   0x0000000A
+0180: 0x00000094   0x00000006   0x00000001   0x00001DB1
+0190: 0x00000002   0x76726553   0x20656369   0x6B636150
+01A0: 0x00003120   0x00000000   0x00000000   0x00000000
+01B0: 0x00000000   0x00000000   0x00000000   0x00000000
+01C0: 0x00000000   0x00000000   0x00000000   0x00000000
+01D0: 0x00000000   0x00000000   0x00000000   0x00000000
+01E0: 0x00000000   0x00000000   0x00000000   0x00000000
+01F0: 0x00000000   0x00000000   0x00000000   0x00000000
+0200: 0x00000000   0x00000000   0x00000000   0x00000000
+0210: 0x00824588   0x00000000   0x00000000   0x7FFDF000
+0220: 0xC0000005   0x757622FE   0x017C248F   0x00000044
+0230: 0x017F6420   0x017F53A0   0x017F38A0   0x00000000
+0240: 0x00000000   0x00000000   0x00000000   0x00000000
+0250: 0x00000000   0x00000000   0x00000000   0x00000000
+0260: 0x00000000   0xFFFFFFFF   0xFFFFFFFF   0xFFFFFFFF
+0270: 0x00000000   0x00000000   0x0022FE78   0x0022F904

SCM Op: 0x0, lDbg: 0 LastRendObj: 0

Game Version: US 1.0

And this is the sampfuncs.log file
http://puu.sh/cHatC/fc2041324e.log
 

moadif

Member
Joined
Apr 17, 2013
Messages
11
Reaction score
0
pepeelpubero link said:
The problem is you are writting it with sampfuncs opcodes (so sampfuncs is needed).

Check this to write client/server msg without sampfuncs and tell us if you need help: http://ugbase.eu/snippets/write-in-chat-without-sfuncs-(0af80af9)/

Also put all the code, not that part.

I already have Sampfuncs installed. anyway


After using the code in the link you provided my game still crashes
Code:
SA-MP 0.3z
Exception At Address: 0x00000000
Base: 0x036A0000

Registers:
EAX: 0x0000012C	EBX: 0x00000001	ECX: 0x02E65998	EDX: 0x00003E1C
ESI: 0x00000064	EDI: 0x02E608E0	EBP: 0x0046A201	ESP: 0x0022FD0C
EFLAGS: 0x00010202

Stack:
+0000: 0x6D2C2052   0x02E65998   0x02E65998   0x00469FF7
+0010: 0x00007564   0x02E65998   0x00000000   0x0046A220
+0020: 0x7AFB05F9   0x00000609   0x0022FD94   0x00000000
+0030: 0x0000000D   0xFFE1E1E1   0x80808080   0xFF000000
+0040: 0x0053BFCC   0x0000001A   0x7AF7282A   0x00000000
+0050: 0x7668BA60   0x0371A916   0x7AF7282A   0x03705B5D
+0060: 0x0000001A   0x7AF7282A   0x00000000   0x0E234578
+0070: 0x0022FD6C   0x0022F918   0x0022FF78   0x03750AA4
+0080: 0x03772EB0   0x00000001   0x76BF80E0   0x0053E986
+0090: 0x00000001   0x775B6164   0x775F6ED5   0x0053ECC2
+00A0: 0x00000001   0x00619B71   0x0000001A   0x00000001
+00B0: 0x00000001   0x0000000A   0x00748DA0   0x0000001A
+00C0: 0x00000001   0x7668CF41   0x00000000   0x0022FF88
+00D0: 0x7FFDF000   0x01610000   0x4EF5EDAA   0x01611E98
+00E0: 0x00000008   0x00000100   0x00000008   0x00000102
+00F0: 0x44700000   0x44070000   0x00000000   0x00000000
+0100: 0x00000780   0x00000438   0x00000000   0x00000001
+0110: 0x00200286   0x00000200   0x00000000   0x021C03C0
+0120: 0x037097DD   0x000003C0   0x0000021C   0x0000002C
+0130: 0x0022FE2C   0x00825EA4   0x7668CF41   0x00000000
+0140: 0x7FFDF000   0xFFFFFFFF   0x00821D17   0x00000065
+0150: 0x00000065   0x0022FF88   0x008246F1   0x00400000
+0160: 0x00000000   0x018B248F   0x0000000A   0x00000094
+0170: 0x00000006   0x00000001   0x00001DB1   0x00000002
+0180: 0x76726553   0x20656369   0x6B636150   0x00003120
+0190: 0x00000000   0x00000000   0x00000000   0x00000000
+01A0: 0x00000000   0x00000000   0x00000000   0x00000000
+01B0: 0x00000000   0x00000000   0x00000000   0x00000000
+01C0: 0x00000000   0x00000000   0x00000000   0x00000000
+01D0: 0x00000000   0x00000000   0x00000000   0x00000000
+01E0: 0x00000000   0x00000000   0x00000000   0x00000000
+01F0: 0x00000000   0x00000000   0x00000000   0x00824588
+0200: 0x00000000   0x00000000   0x7FFDF000   0xC0000005
+0210: 0x00000000   0x018B248F   0x00000044   0x018E6528
+0220: 0x018E5568   0x018E3DA8   0x00000000   0x00000000
+0230: 0x00000000   0x00000000   0x00000000   0x00000000
+0240: 0x00000000   0x00000000   0x00000000   0x00000000
+0250: 0xFFFFFFFF   0xFFFFFFFF   0xFFFFFFFF   0x00000000
+0260: 0x00000000   0x0022FE78   0x0022F918   0x0022FFC4
+0270: 0x00825EA4   0x00888078   0x00000000   0x0022FF94

SCM Op: 0x470, lDbg: 0 LastRendObj: 0

Game Version: US 1.0

State Information: Ped Context: 0


Apparently loading sampBase crashes my client for some reason, what could I be doing wrong, I've tried using this aswell
Code:
0AA2: 0@ = load_library "samp.dll"

But same result as this
Code:
0AA2: 0@ = load_library "kernel32.dll" 
0AA4: 1@ = get_proc_address "GetModuleHandleA" library 0@ 
0AA7: call_function 1@ num_params 1 pop 0 "samp.dll" 0@ // 0@ = sampBase


And this is the whole script(without any message sending function)
Code:
removed

Sending a message should go where it says "//SEND A SERVER MESSAGE HERE" in the code above.
I'd appreciate any kind of help
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Working on foot.

With car, warnings then crash, problem is this:
Code:
03C0: store_car_char_is_in_no_save $PLAYER_ACTOR store_to 10@
03C0: store_car_char_is_in_no_save $PLAYER_ACTOR store_to 11@

It must be:
Code:
03C0: STORE_TO 10@ CHAR $PLAYER_ACTOR
03C0: STORE_TO 11@ CHAR $PLAYER_ACTOR

Also there is a problem with a label:

Code:
:DEEPPOCKET_67 // Note: a jump to this label will crash the game

Another problem, is here :)DEEPPOCKET_3 and :DEEPPOCKET_2, same problem, change that too):

:DEEPPOCKET_3
00D6: if
00DF:  is_char_in_any_car $PLAYER_ACTOR
then
03C0: store_car_char_is_in_no_save $PLAYER_ACTOR store_to 11@
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
015F: set_fixed_camera_position 1@ 2@ 3@ rotation 0.0 0.0 0.0
0158: point_camera_at_car 11@ mode 18 switchstyle 2
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 2172.6489 -2265.7698 13.3557
0001: wait 200
036A: warp_char_into_car $PLAYER_ACTOR car 11@
015A: restore_camera
0373: set_camera_behind_player
0AD1: print_formatted_now "Got the materials! - CAR" time 800 0x0AD1
0002: goto @DEEPPOCKET_1
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
//015F: set_fixed_camera_position 1@ 2@ 3@ rotation 0.0 0.0 0.0
//0160: point_camera_at_point 1@ 2@ 3@ switchstyle 2
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 2172.6489 -2265.7698 13.3557
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_behind_player
0AD1: print_formatted_now "Got the materials! - FOOT" time 800 0x0AD1
0002: goto @DEEPPOCKET_1
end

It must be:
Code:
:DEEPPOCKET_3
00D6: if
00DF:   is_char_in_any_car $PLAYER_ACTOR 
then
03C0: store_car_char_is_in_no_save $PLAYER_ACTOR store_to 11@
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
015F: set_fixed_camera_position 1@ 2@ 3@ rotation 0.0 0.0 0.0
0158: point_camera_at_car 11@ mode 18 switchstyle 2
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 2172.6489 -2265.7698 13.3557
0001: wait 200
036A: warp_char_into_car $PLAYER_ACTOR car 11@
015A: restore_camera
0373: set_camera_behind_player
0AD1: print_formatted_now "Got the materials! - CAR" time 800 0x0AD1
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
//015F: set_fixed_camera_position 1@ 2@ 3@ rotation 0.0 0.0 0.0
//0160: point_camera_at_point 1@ 2@ 3@ switchstyle 2 
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 2172.6489 -2265.7698 13.3557
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_behind_player
0AD1: print_formatted_now "Got the materials! - FOOT" time 800 0x0AD1
end
0002: goto @DEEPPOCKET_1

And (no problem but...) you are using this:

Code:
0AD1: print_formatted_now "Picked the package! - CAR" time 800 0x0AD1

It must be:
Code:
0AD1: print_formatted_now "Picked the package! - CAR" time 800

0x0AD1 (or another thing) is used when you got %s, %d, %f or another string specifiers (i think that is the name)

Also the code got another errors, check it by yourself (waits, camera, car...)

Code:
{$CLEO .cs}

wait 3000

03A4: script_name 'DEEPPOCKET'

:DEEPPOCKET_1
0001: wait 0
00D6: if 
0AB0:   is_key_pressed 113  
then
wait 100
0002: goto @DEEPPOCKET_2
end  
00D6: if
0AB0:   is_key_pressed 114
then
wait 100
0002: goto @DEEPPOCKET_3
end
004D: goto_if_false @DEEPPOCKET_1   
0002: goto @DEEPPOCKET_1
                
:DEEPPOCKET_2
wait 0
00D6: if
00DF:   is_char_in_any_car $PLAYER_ACTOR 
then
03C0: STORE_TO 10@ CHAR $PLAYER_ACTOR
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 1423.7230 -1319.2557 13.5547

0AF9: "MESSAGE CAR"

0001: wait 100                  
036A: put_actor $PLAYER_ACTOR in_car 10@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
036A: put_actor $PLAYER_ACTOR in_car 10@
015A: restore_camera
0373: set_camera_directly_behind_player 
0AD1: print_formatted_now "Picked the package! - CAR" time 800
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 1423.7230 -1319.2557 13.5547

0AF9: "MESSAGE FOOT"

0001: wait 100
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_directly_behind_player
0AD1: print_formatted_now "Picked the package! - FOOT" time 800
wait 200
end
0002: goto @DEEPPOCKET_1

:DEEPPOCKET_3
wait 0
00D6: if
00DF:   is_char_in_any_car $PLAYER_ACTOR 
then
03C0: STORE_TO 11@ CHAR $PLAYER_ACTOR
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 2172.6489 -2265.7698 13.3557
0001: wait 100
036A: put_actor $PLAYER_ACTOR in_car 11@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
036A: put_actor $PLAYER_ACTOR in_car 11@
015A: restore_camera
0373: set_camera_directly_behind_player 
0AD1: print_formatted_now "Got the materials! - CAR" time 800 
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 2172.6489 -2265.7698 13.3557
0001: wait 100
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_directly_behind_player
0AD1: print_formatted_now "Got the materials! - FOOT" time 800
wait 200
end
0002: goto @DEEPPOCKET_1

Code:
{$CLEO .cs}

wait 3000

03A4: script_name 'DEEPPOCKET'

alloc 15@ = 260
alloc 16@ = 260
format 15@ = "MESSAGE CAR"
format 16@ = "MESSAGE FOOT"

:DEEPPOCKET_1
0001: wait 0
00D6: if 
0AB0:   is_key_pressed 113  
then
wait 100
0002: goto @DEEPPOCKET_2
end  
00D6: if
0AB0:   is_key_pressed 114
then
wait 100
0002: goto @DEEPPOCKET_3
end
004D: goto_if_false @DEEPPOCKET_1   
0002: goto @DEEPPOCKET_1
                
:DEEPPOCKET_2
wait 0
00D6: if
00DF:   is_char_in_any_car $PLAYER_ACTOR 
then
03C0: STORE_TO 10@ CHAR $PLAYER_ACTOR
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 1423.7230 -1319.2557 13.5547

0AB1: @SAY 1 15@

0001: wait 100                  
036A: put_actor $PLAYER_ACTOR in_car 10@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
036A: put_actor $PLAYER_ACTOR in_car 10@
015A: restore_camera
0373: set_camera_directly_behind_player 
0AD1: print_formatted_now "Picked the package! - CAR" time 800
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 1423.7230 -1319.2557 13.5547

0AB1: @SAY 1 16@

0001: wait 100
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_directly_behind_player
0AD1: print_formatted_now "Picked the package! - FOOT" time 800
wait 200
end
0002: goto @DEEPPOCKET_1

:DEEPPOCKET_3
wait 0
00D6: if
00DF:   is_char_in_any_car $PLAYER_ACTOR 
then
03C0: STORE_TO 11@ CHAR $PLAYER_ACTOR
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 2172.6489 -2265.7698 13.3557
0001: wait 100
036A: put_actor $PLAYER_ACTOR in_car 11@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@ 
036A: put_actor $PLAYER_ACTOR in_car 11@
015A: restore_camera
0373: set_camera_directly_behind_player 
0AD1: print_formatted_now "Got the materials! - CAR" time 800 
else
00A0: get_char_coordinates $PLAYER_ACTOR store_to 1@ 2@ 3@
0001: wait 200
00A1: set_char_coordinates $PLAYER_ACTOR to 2172.6489 -2265.7698 13.3557
0001: wait 100
00A1: set_char_coordinates $PLAYER_ACTOR to 1@ 2@ 3@
015A: restore_camera
0373: set_camera_directly_behind_player
0AD1: print_formatted_now "Got the materials! - FOOT" time 800
wait 200
end
0002: goto @DEEPPOCKET_1

:SAY
IF 0AA2: 17@ = "samp.dll"
THEN
    17@ += 0x4C30
    0AA5: call 17@ num_param 1 pop 0 18@
END
0AB2: 0

Without sampfuncs crash at the moment of send the message i don't know why.
 

moadif

Member
Joined
Apr 17, 2013
Messages
11
Reaction score
0
Thanks for the response, but after using the code(sampfunc version) I'm still going through client crashes, here's the crash report:
Code:
SA-MP 0.3z
Exception At Address: 0x00000000
Base: 0x03420000

Registers:
EAX: 0x00000052	EBX: 0x00000001	ECX: 0x01DA5998	EDX: 0x00002BAE
ESI: 0x00000064	EDI: 0x01DA08E0	EBP: 0x0046A201	ESP: 0x0022FD0C
EFLAGS: 0x00010202

Stack:
+0000: 0x72D92052   0x01DA5998   0x01DA5998   0x00469FF7
+0010: 0x0000202D   0x01DA5998   0x00000000   0x0046A220
+0020: 0xE9FD609E   0x00000BEF   0x0022FD94   0x00000000
+0030: 0x0000001D   0xFFE1E1E1   0x80808080   0xFF000000
+0040: 0x0053BFCC   0x0000001A   0xE9F908A5   0x00000000
+0050: 0x7668BA60   0x0349A916   0xE9F908A5   0x03485B5D
+0060: 0x0000001A   0xE9F908A5   0x00000000   0x0E094578
+0070: 0x0022FD6C   0x0022F918   0x0022FF78   0x034D0AA4
+0080: 0x034F2EB0   0x00000001   0x76BF80E0   0x0053E986
+0090: 0x00000001   0x775B6164   0x775F6ED5   0x0053ECC2
+00A0: 0x00000001   0x00619B71   0x0000001A   0x00000001
+00B0: 0x00000001   0x0000000A   0x00748DA0   0x0000001A
+00C0: 0x00000001   0x7668CF41   0x00000000   0x0022FF88
+00D0: 0x7FFD8000   0x01750000   0x4F69F8B4   0x01751E98
+00E0: 0x00000008   0x00000100   0x00000008   0x00000102
+00F0: 0x44700000   0x44070000   0x00000000   0x00000000
+0100: 0x00000780   0x00000438   0x00000000   0x00000001
+0110: 0x00AC03EA   0x00000200   0x00000000   0x021C03C0
+0120: 0x06DE392C   0x000003C0   0x0000021C   0x0000002C
+0130: 0x0022FE2C   0x00825EA4   0x7668CF41   0x00000000
+0140: 0x7FFD8000   0xFFFFFFFF   0x00821D17   0x00000065
+0150: 0x00000065   0x0022FF88   0x008246F1   0x00400000
+0160: 0x00000000   0x0178248F   0x0000000A   0x00000094
+0170: 0x00000006   0x00000001   0x00001DB1   0x00000002
+0180: 0x76726553   0x20656369   0x6B636150   0x00003120
+0190: 0x00000000   0x00000000   0x00000000   0x00000000
+01A0: 0x00000000   0x00000000   0x00000000   0x00000000
+01B0: 0x00000000   0x00000000   0x00000000   0x00000000
+01C0: 0x00000000   0x00000000   0x00000000   0x00000000
+01D0: 0x00000000   0x00000000   0x00000000   0x00000000
+01E0: 0x00000000   0x00000000   0x00000000   0x00000000
+01F0: 0x00000000   0x00000000   0x00000000   0x00824588
+0200: 0x00000000   0x00000000   0x7FFD8000   0xC0000005
+0210: 0x00000000   0x0178248F   0x00000044   0x017B6528
+0220: 0x017B5568   0x017B3DA8   0x00000000   0x00000000
+0230: 0x00000000   0x00000000   0x00000000   0x00000000
+0240: 0x00000000   0x00000000   0x00000000   0x00000000
+0250: 0xFFFFFFFF   0xFFFFFFFF   0xFFFFFFFF   0x00000000
+0260: 0x00000000   0x0022FE78   0x0022F918   0x0022FFC4
+0270: 0x00825EA4   0x00888078   0x00000000   0x0022FF94

SCM Op: 0x470, lDbg: 0 LastRendObj: 3214

Game Version: US 1.0

State Information: Ped Context: 0
P0 (0,0) P1 (0,0) P2 (19,815) P3 (19,241) 
P4 (0,0) P5 (0,0) P6 (0,0) P7 (0,0) 
P8 (0,0) P9 (0,0) P10 (0,0) P11 (19,751) 
P12 (0,0) P13 (0,0) P14 (0,0) P15 (0,0) 
P16 (0,0) P17 (19,814) P18 (0,0) P19 (0,0) 
P20 (0,0) P21 (0,0) P22 (0,0) P23 (0,0) 
P24 (0,0) P25 (17,0) P26 (19,833) P27 (0,0) 
P28 (0,0) P29 (0,0) P30 (0,0) P31 (17,0) 
P32 (0,0) P33 (19,736) P34 (0,0) P35 (0,0) 
P36 (0,0) P37 (33,0) P38 (0,0) P39 (0,0) 
P40 (0,0) P41 (0,0) P42 (0,0) P43 (0,0) 
P44 (0,0) P45 (0,0) P46 (0,0) P47 (0,0) 
P48 (0,0) P49 (0,0) P50 (0,0) P52 (19,744) P53 (33,0) P54 (0,0) P55 (0,0) 
P56 (17,0) P57 (0,0) P58 (0,0) P59 (0,0) 
P60 (0,0) P61 (0,0) P63 (0,0) 
P64 (0,0) P65 (0,0) P66 (19,812) P67 (0,0) 
P68 (0,0) P69 (0,0) P70 (18,815) P71 (0,0) 
P73 (0,0) P74 (0,0) P75 (0,0) 
P76 (0,0) P77 (0,0) P78 (0,0) P79 (0,0) 
P80 (0,0) P81 (0,0) P82 (0,0) P83 (17,0) 
P84 (0,0) P85 (0,0) P86 (0,0) P87 (0,0) 
P88 (0,0) P89 (19,707) P90 (0,0) P91 (0,0) 
P92 (0,0) P93 (0,0) P94 (0,0) P96 (0,0) P97 (0,0) P98 (0,0) P99 (0,0) 
P100 (0,0) P101 (33,0) P102 (0,0) P103 (0,0) 
P104 (0,0) P105 (0,0) P106 (0,0) P108 (0,0) P109 (19,486) P112 (0,0) P117 (0,0) P119 (0,0) 
P124 (17,0) P125 (0,0) P130 (0,0) P132 (0,0) P134 (0,0)
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Code:
{$CLEO .cs}
0000:
wait 3000


alloc 31@ = 260
alloc 30@ = 260
format 31@ = "i'm in a car"
format 30@ = "i'm on foot"

WHILE TRUE
    WAIT 0
    IF 0AB0: 113
    THEN GOSUB @pickPackage
    END
    
    IF 0AB0: 114
    THEN GOSUB @getMaterials
    END
END


:pickPackage
IF 00DF:   actor $PLAYER_ACTOR driving
THEN
    03C0: 0@ = $PLAYER_ACTOR
    car.StorePos(0@, 1@, 2@, 3@)
    0AB1: @teleport_to_point 3 1423.7230 -1319.2557 13.5547 //teleport car to pos
    wait 200
    0AB1: @SAY 1 31@
    wait 200
    0AB1: @teleport_to_point 3 1@ 2@ 3@           //teleport car to old pos
    0AD1: "Picked the package! - CAR" time 1000
ELSE
    actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
    0AB1: @teleport_to_point 3 1423.7230 -1319.2557 13.5547  //teleport player to pos
    wait 200
    0AB1: @SAY 1 30@
    wait 200
    0AB1: @teleport_to_point 3 0@ 1@ 2@    //teleport player to old pos
    0AD1: "Picked the package! - FOOT" time 1000
END
return

:getMaterials
IF 00DF:   actor $PLAYER_ACTOR driving
THEN
    03C0: 0@ = $PLAYER_ACTOR
    car.StorePos(0@, 1@, 2@, 3@)
    0AB1: @teleport_to_point 3 2172.6489 -2265.7698 13.3557
    wait 200
    0AB1: @teleport_to_point 3 1@ 2@ 3@
    0AD1: print_formatted_now "Got the materials! - CAR" time 1000
ELSE
    actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
    0AB1: @teleport_to_point 3 2172.6489 -2265.7698 13.3557
    wait 200
    0AB1: @teleport_to_point 3 1@ 2@ 3@
    0AD1: print_formatted_now "Got the materials! - FOOT" time 1000
END
return
    
:teleport_to_point
if 00DF:   actor $PLAYER_ACTOR driving
then
    03C0: 4@ = actor $PLAYER_ACTOR car
    0A97: 3@ = car 4@ struct
    000A: 3@ += 20
    0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0
    000A: 3@ += 48
    0A8C: write_memory 3@ size 4 value 0@ virtual_protect 0
    000A: 3@ += 4
    0A8C: write_memory 3@ size 4 value 1@ virtual_protect 0
    000A: 3@ += 4
    0A8C: write_memory 3@ size 4 value 2@ virtual_protect 0
else
    0A96: 3@ = actor $PLAYER_ACTOR struct
    000A: 3@ += 20
    0A8D: 3@ = read_memory 3@ size 4 virtual_protect 0
    000A: 3@ += 48
    0A8C: write_memory 3@ size 4 value 0@ virtual_protect 0
    000A: 3@ += 4
    0A8C: write_memory 3@ size 4 value 1@ virtual_protect 0
    000A: 3@ += 4
    0A8C: write_memory 3@ size 4 value 2@ virtual_protect 0
end
0AB2: ret 0

:SAY
IF 0AA2: 1@ = "samp.dll"
THEN
    1@ += 0x4CA0
    0AA5: call 1@ num_param 1 pop 0 0@
END
0AB2: 0
 
Status
Not open for further replies.
Top