Hello UG-Base!
From now, sorry for my bad english.
What i want to do:
- when a faction member connects, in chat appears next message: "(Group): x from your group has just logged in.".
So, i want to select x's name and auto type (/r is faction chat) "/r Hello, @x. Welcome to the server!", x being user that logged.
Can i do that? I tried 2-3 days, with another forums, but i can't.
I tried a lot and this script came out:
And gives me that error: https://imgur.com/a/AkXNku7
Thanks in advice!
@springfield
From now, sorry for my bad english.
What i want to do:
- when a faction member connects, in chat appears next message: "(Group): x from your group has just logged in.".
So, i want to select x's name and auto type (/r is faction chat) "/r Hello, @x. Welcome to the server!", x being user that logged.
Can i do that? I tried 2-3 days, with another forums, but i can't.
I tried a lot and this script came out:
Code:
{$CLEO .cs}
{$INCLUDE SF}
0000:
repeat
wait 0
until 0AFA: is_samp_available
0B34: samp register_client_command "activate" to_label @activate
0BE3: raknet setup_incoming_rpc_hook @on_new_chatline
:First
wait 0
if and
31@ == 1
30@ == 1
then
31@ = 0
0AC8: 0@ = allocate_memory_size 260
0AB1: @GETCHATENTRYTEXT 1 id 99 to 0@
if
0AD4: 2@ = scan_string 0@ format "(Group): Reward from your group has just logged in." 1@
then
0AF9: samp say_msg "test"
end
0AC9: free_allocated_memory 0@
end
jump @First
:activate
0B12: 30@ = 30@ XOR 1
samp.CmdRet
:on_new_chatline
0BE5: raknet 29@ = get_hook_param PARAM_PACKETID
if 29@ == RPC_ScrClientMessage
then
31@ = 1
end
0BE0: raknet hook_ret true
:getChatEntryText
0AF7: samp 1@ = get_base
1@ += 0x212A6C
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
1@ += 0x136
0@ *= 252 // size of stChatEntry
005A: 1@ += 0@ // (int)
1@ += 28
0AB2: 1 1@
And gives me that error: https://imgur.com/a/AkXNku7
Thanks in advice!
@springfield