Derrekgamer
Active member
hello im trying to make a mod that will read the message after an used command or how can we call it.
let s say You use the command /sendmsj "message".
it will be like /sendmsj "sell car who wants to buy?"
Now the text "sell car who wants to buy" can be a random text so any text i put after the /sendmsj it will be readed and sent to the multiple chats like /c /ad /pc /vip etc.
This is the points if we can send multiple messages to more chat by using a command but the message text should be random
this is an example :
register command "/sendmsj"
if any text was detected after the /sendmsj command then send that text to /c /pc /ad /vip etc.
another example with ss:
as you seee in that ss, after the command /sendmsj u can see i typed the message "i sell car who want to buy"
Now if we press enter, that message will be sent to more chats in game like /r /f /c etc etc.
and that message should be random like i can type whatever i want. so if i type let s say "/sendmsj we are making cmd" it will send the we are making cmd message to other chats. like /r /f /c etc etc.
so the mod should detect the text i typed after the command and sent it to more chats in game after i press enter..
I asked @ajom about that and him gave me some codes but i dont know how to assemble the code i tryed some ways but game crash at start or when i use the command.
This is what ajom gave me hope you can assemble it if you want of course..
let s say You use the command /sendmsj "message".
it will be like /sendmsj "sell car who wants to buy?"
Now the text "sell car who wants to buy" can be a random text so any text i put after the /sendmsj it will be readed and sent to the multiple chats like /c /ad /pc /vip etc.
This is the points if we can send multiple messages to more chat by using a command but the message text should be random
this is an example :
register command "/sendmsj"
if any text was detected after the /sendmsj command then send that text to /c /pc /ad /vip etc.
another example with ss:
as you seee in that ss, after the command /sendmsj u can see i typed the message "i sell car who want to buy"
Now if we press enter, that message will be sent to more chats in game like /r /f /c etc etc.
and that message should be random like i can type whatever i want. so if i type let s say "/sendmsj we are making cmd" it will send the we are making cmd message to other chats. like /r /f /c etc etc.
so the mod should detect the text i typed after the command and sent it to more chats in game after i press enter..
I asked @ajom about that and him gave me some codes but i dont know how to assemble the code i tryed some ways but game crash at start or when i use the command.
This is what ajom gave me hope you can assemble it if you want of course..
Code:
You can initialize an allocated buffer before the main loop using:
PHP:
alloc 31@ 300 // now 31@ can handle up to 299 characters sized string
alloc 30@ 300 // now 30@ can handle up to 299 characters sized string
Then at CMD hook:
PHP:
:cmdhook
0B35: samp 0@ = get_last_command_params
If 0@ > 0
Then format 31@ 0@
End
29@ = True // tell the main loop to make a series of message
cmd_ret
At Main Loop:
PHP:
If 29@ == true
Then
Format 30@ "/c %s " 31@
Say 30@
Wait 500
Format 30@ "/pc %s " 31@
Say 30@
Wait 500
Format 30@ "/ad %s " 31@
Say 30@
Wait 500
Format 30@ "/vip %s " 31@
Say 30@
29@ = false // turn off the message series
End