CLEO Help Timestamp.

CLEO related
Status
Not open for further replies.

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Hi, i need help to script something that show timestamp on the screen like the image below but obviously with timestamp and in another part of the screen.

Tell me some opcodes or how to script that please.

MHDAauw.jpg
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
That mod's script is basicly made from these opcodes :

03F0: enable_text_draw 1
0342: enable_text_draw_centered 1
0340: set_text_draw_RGBA 180 180 180 255
045A: draw_text_1number 16.0 384.0 GXT 'NUMBER' number 1@  // ~1~
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
xzytro link said:
That mod's script is basicly made from these opcodes :

03F0: enable_text_draw 1
0342: enable_text_draw_centered 1
0340: set_text_draw_RGBA 180 180 180 255
045A: draw_text_1number 16.0 384.0 GXT 'NUMBER' number 1@  // ~1~

But how to get timestamp?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
:GetSystemTime
{
Params:
In: None
Out: wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
Example:
0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
}
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 4@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 5@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 6@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 7@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 8@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 9@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 10@ = read mem 2@ size 2 vp 0
2@ -= 30
ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@

from BH
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Thanks a lot, i think is the last question. How to combine that? I'm a newbie on scripting, i just know how to create objects.

Code:
03F0: enable_text_draw 1
0342: enable_text_draw_centered 1
0340: set_text_draw_RGBA 180 180 180 255
045A: draw_text_1number 16.0 384.0 GXT 'NUMBER' number 1@  // ~1~

Code:
{$CLEO.CS}

:GetSystemTime
{
Params:
In: None
Out: wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
Example:
0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
}
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 4@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 5@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 6@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 7@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 8@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 9@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 10@ = read mem 2@ size 2 vp 0
2@ -= 30
ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,492
Reaction score
236
Location
( ͡° ͜ʖ ͡°)
Code:
{$CLEO .CS}

0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ "~1~:~1~"


WHILE TRUE
WAIT 0
    0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
    03F0: enable_text_draw 1
    0342: enable_text_draw_centered 1
    0340: set_text_draw_RGBA 180 180 180 255
    045B: draw_text_2numbers 320.0 390.0 GXT 'CRED000' numbers 8@ 9@  // ~1~:~1~
END

:GetSystemTime
{
Params:
In: None
Out: wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
Example:
0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
}
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 4@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 5@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 6@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 7@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 8@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 9@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 10@ = read mem 2@ size 2 vp 0
2@ -= 30
ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Opcode.eXe link said:
Code:
{$CLEO .CS}

0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ "~1~:~1~"


WHILE TRUE
WAIT 0
    0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
    03F0: enable_text_draw 1
    0342: enable_text_draw_centered 1
    0340: set_text_draw_RGBA 180 180 180 255
    045B: draw_text_2numbers 320.0 390.0 GXT 'CRED000' numbers 8@ 9@  // ~1~:~1~
END

:GetSystemTime
{
Params:
In: None
Out: wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
Example:
0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
}
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = alloc mem 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 4@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 5@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 6@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 7@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 8@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 9@ = read mem 2@ size 2 vp 0
2@ += 2
0A8D: 10@ = read mem 2@ size 2 vp 0
2@ -= 30
ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@

Thanks but i can't compile it. It says: Uknown directive ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@.

I think I solved it with the opcode, wait...
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
springfield link said:
0AB2: not 0AB2=

Yes, i know i said "=" but i have the ":". When the bar loads, the game crashes on W7 or "has stopped working" on XP.

Code:
SA-MP 0.3z
Exception At Address: 0x00000000
Base: 0x034D0000

Registers:
EAX: 0x00000112	EBX: 0x00000001	ECX: 0x02EF0F28	EDX: 0x00006CE2
ESI: 0x00000064	EDI: 0x00000000	EBP: 0x0022FD94	ESP: 0x0022FD0C
EFLAGS: 0x00210206

Stack:
+0000: 0x711C2052   0x02EF0F28   0x02EF0F28   0x00469FF7
+0010: 0x00006B64   0x02EF0F28   0x00000000   0x0046A220
+0020: 0x59787870   0x00000087   0x0022FD94   0x00000000
+0030: 0x00000010   0x0022FD84   0x0083C528   0xFFFFFFFF
+0040: 0x0053BFCC   0x0000001A   0x597877FF   0x00000000
+0050: 0x0000001A   0x597877FF   0x03B909E0   0x03535B5D
+0060: 0x0000001A   0x597877FF   0x00000000   0x758880E0
+0070: 0x0022FD6C   0x0022F918   0x0022FF78   0x03580AA4
+0080: 0x035A2EB0   0x00000001   0x758880E0   0x0053E986
+0090: 0x00000001   0x00000003   0x00000064   0x0053ECC2
+00A0: 0x00000001   0x00619B71   0x0000001A   0x00000001
+00B0: 0x00000001   0x0000000A   0x00748DA0   0x0000001A
+00C0: 0x00000001   0x753AD8F3   0x00000000   0x0022FF88
+00D0: 0x7FFDA000   0x011D0000   0x4EB2F0E4   0x041D10F0
+00E0: 0x00000008   0x00000100   0x00000008   0x00000102
+00F0: 0x43C80000   0x43960000   0x00000000   0x00000000
+0100: 0x00000320   0x00000258   0x00000000   0x00000001
+0110: 0x00811046   0x00000200   0x00000000   0x012C0190
+0120: 0x1029FFB6   0x00000190   0x0000012C   0x0000002C
+0130: 0x0022FE2C   0x00825EA4   0x753AD8F3   0x00000000
+0140: 0x7FFDA000   0xFFFFFFFF   0x00821D17   0x00000065
+0150: 0x00000065   0x0022FF88   0x008246F1   0x00400000
+0160: 0x00000000   0x01902698   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   0x7FFDA000   0xC0000005
+0210: 0x00000000   0x01902698   0x00000044   0x01940210
+0220: 0x01942B90   0x01941598   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: 0x446, lDbg: 0 LastRendObj: 0

Game Version: US 1.0
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
After the bar loads, my games crashes on WINDOWS7 but with XP "has stopped working". HELP ME PLEASE!!

Code:
SA-MP 0.3z
Exception At Address: 0x00000000
Base: 0x034D0000

Registers:
EAX: 0x00000112	EBX: 0x00000001	ECX: 0x02EF0F28	EDX: 0x00006CE2
ESI: 0x00000064	EDI: 0x00000000	EBP: 0x0022FD94	ESP: 0x0022FD0C
EFLAGS: 0x00210206

Stack:
+0000: 0x711C2052   0x02EF0F28   0x02EF0F28   0x00469FF7
+0010: 0x00006B64   0x02EF0F28   0x00000000   0x0046A220
+0020: 0x59787870   0x00000087   0x0022FD94   0x00000000
+0030: 0x00000010   0x0022FD84   0x0083C528   0xFFFFFFFF
+0040: 0x0053BFCC   0x0000001A   0x597877FF   0x00000000
+0050: 0x0000001A   0x597877FF   0x03B909E0   0x03535B5D
+0060: 0x0000001A   0x597877FF   0x00000000   0x758880E0
+0070: 0x0022FD6C   0x0022F918   0x0022FF78   0x03580AA4
+0080: 0x035A2EB0   0x00000001   0x758880E0   0x0053E986
+0090: 0x00000001   0x00000003   0x00000064   0x0053ECC2
+00A0: 0x00000001   0x00619B71   0x0000001A   0x00000001
+00B0: 0x00000001   0x0000000A   0x00748DA0   0x0000001A
+00C0: 0x00000001   0x753AD8F3   0x00000000   0x0022FF88
+00D0: 0x7FFDA000   0x011D0000   0x4EB2F0E4   0x041D10F0
+00E0: 0x00000008   0x00000100   0x00000008   0x00000102
+00F0: 0x43C80000   0x43960000   0x00000000   0x00000000
+0100: 0x00000320   0x00000258   0x00000000   0x00000001
+0110: 0x00811046   0x00000200   0x00000000   0x012C0190
+0120: 0x1029FFB6   0x00000190   0x0000012C   0x0000002C
+0130: 0x0022FE2C   0x00825EA4   0x753AD8F3   0x00000000
+0140: 0x7FFDA000   0xFFFFFFFF   0x00821D17   0x00000065
+0150: 0x00000065   0x0022FF88   0x008246F1   0x00400000
+0160: 0x00000000   0x01902698   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   0x7FFDA000   0xC0000005
+0210: 0x00000000   0x01902698   0x00000044   0x01940210
+0220: 0x01942B90   0x01941598   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: 0x446, lDbg: 0 LastRendObj: 0

Game Version: US 1.0

Code:
{$CLEO .cs}

0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ "~1~:~1~"


WHILE TRUE
WAIT 0
    0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
    03F0: enable_text_draw 1
    0342: enable_text_draw_centered 1
    0340: set_text_draw_RGBA 180 180 180 255
    045B: draw_text_2numbers 320.0 390.0 GXT 'CRED000' numbers 8@ 9@  // ~1~:~1~
END

:GetSystemTime
{
Params:
In: None
Out: wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
Example:
0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
}
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = allocate_memory_size 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 4@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 5@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 6@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 7@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 8@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 9@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 10@ = read_memory 2@ size 2 virtual_protect 0
2@ -= 30
0AB2: ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Code:
[code]{$CLEO .cs}
0000: NOP
wait 1000
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ "~1~:~1~"


WHILE TRUE
WAIT 0
    0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
    03F0: enable_text_draw 1
    0342: enable_text_draw_centered 1
    0340: set_text_draw_RGBA 180 180 180 255
    045B: draw_text_2numbers 320.0 390.0 GXT 'CRED000' numbers 8@ 9@  // ~1~:~1~
END

:GetSystemTime
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = allocate_memory_size 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 4@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 5@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 6@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 7@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 8@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 9@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 10@ = read_memory 2@ size 2 virtual_protect 0
2@ -= 30
0AB2: ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
springfield link said:
Code:
{$CLEO .cs}
0000: NOP
wait 1000
0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED000' 0@
0AA5: call 0x718600 2 pop 2 0@ "~1~:~1~"


WHILE TRUE
WAIT 0
    0AB1: Call @GetSystemTime 0 wYear 3@ wMonth 4@ wDayOfWeek 5@ wDay 6@ wHour 7@ wMinute 8@ wSeconds 9@ wMiliseconds 10@
    03F0: enable_text_draw 1
    0342: enable_text_draw_centered 1
    0340: set_text_draw_RGBA 180 180 180 255
    045B: draw_text_2numbers 320.0 390.0 GXT 'CRED000' numbers 8@ 9@  // ~1~:~1~
END

:GetSystemTime
0AA2: 0@ = load_library "kernel32.dll"
0AA4: 1@ = get_proc_address "GetSystemTime" library 0@
0AC8: 2@ = allocate_memory_size 32
0AA5: call 1@ params 1 pop 0 2@
0A8D: 3@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 4@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 5@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 6@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 7@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 8@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 9@ = read_memory 2@ size 2 virtual_protect 0
2@ += 2
0A8D: 10@ = read_memory 2@ size 2 virtual_protect 0
2@ -= 30
0AB2: ret 8 3@ 4@ 5@ 6@ 7@ 8@ 9@ 10@

Thanks springfield but crash again. Can you try it on your game?
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Opcode.eXe link said:
:watchout: Its working for me!

Maybe install CLEO 4.1 ?  :red_eyes:

I have it, but i will re-install the cleo 4.1

With CLEO 4.1, join a server but give me warnings and crash:

Code:
[18:19:51] {FFFFFF}SA-MP {B9C9BF}0.3z {FFFFFF}Started

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x4897E4

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x4897E4

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x486DDF

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

[18:19:52] Warning(s007): Exception 0xC0000005 at 0x0

Make it cleo please, i have cleo 4.1 and only sampfuncs on my CLEO folder.
 
Status
Not open for further replies.
Top