DuFF
Member
- Joined
- Apr 5, 2014
- Messages
- 20
- Reaction score
- 0
Hello,
I'm trying to make a script for RP server. When I see in the chat, that player needs my services, I have to use command "/zakaznik <ID of player>" to teleport to him and offer him my services(RP command).
So I made this script:
But it doesn't work. I can give you examples of the messages from chat.
HrÃ¡Ä {FFFFFF}[D]eniSVK(74) {7171FF} potÅebuje VaÅ¡e služby (129 167 530$ v bance). Nacházà se v {FFFFFF}Shady Creeks.
In my language this means that player [D]eniSVK(his ID - this is, what I need) needs my services (his money in the bank), he is located in (location - 1-3 words)
The most of players have 1 000 000 - 999 999 999$ in the bank, so you don't have to fix it for players with more money than 999 999 999 and less than 1 000 000
You can find the same problem in this post:
http://ugbase.eu/help-7/get-player-id/
I still don't know how to use 0AD4, so, could you try to fix my code?
Thank you for the help and please, excuse my poor english grammar.
I'm trying to make a script for RP server. When I see in the chat, that player needs my services, I have to use command "/zakaznik <ID of player>" to teleport to him and offer him my services(RP command).
So I made this script:
Code:
{$CLEO .cs}
thread 'SERVICES'
:Load
wait 200
if
SAMP.Available
else_jump @Load
0B34: samp register_client_command "onzakaznik" to_label @START
0B34: samp register_client_command "offzakaznik" to_label @STOP
0AC8: 1@ = allocate_memory_size 260
0AC8: 2@ = allocate_memory_size 260
0AC8: 3@ = allocate_memory_size 260
0AC8: 4@ = allocate_memory_size 260
while true
wait 0
if
31@ == 1
then
SAMP.GetChatString(99, 1@, 2@, 3@, 4@)
if or
0AD4: 30@ = scan_string 1@ format "HrÃ¡Ä {FFFFFF}%s(%d) {7171FF} potÅebuje VaÅ¡e služby (%d %d %d$ v bance). Nacházà se v {FFFFFF}%s." 5@ 6@ 7@ 8@ 9@ 10@
0AD4: 30@ = scan_string 1@ format "HrÃ¡Ä {FFFFFF}%s(%d) {7171FF} potÅebuje VaÅ¡e služby (%d %d %d$ v bance). Nacházà se v {FFFFFF}%s %s." 5@ 6@ 7@ 8@ 9@ 10@ 11@
0AD4: 30@ = scan_string 1@ format "HrÃ¡Ä {FFFFFF}%s(%d) {7171FF} potÅebuje VaÅ¡e služby (%d %d %d$ v bance). Nacházà se v {FFFFFF}%s %s %s." 5@ 6@ 7@ 8@ 9@ 10@ 11@ 12@
then
alloc 29@ 64
format 29@ "/zakaznik %d" 6@
0AF9: samp say_msg 29@
31@ = 0
0AF8: samp add_message_to_chat "OFF" color -1
end
end
SAMP.CmdRet()
end
:START
31@ = 1
0AF8: samp add_message_to_chat "ON" color -1
SAMP.CmdRet()
:STOP
31@ = 0
0AF8: samp add_message_to_chat "OFF" color -1
SAMP.CmdRet()
But it doesn't work. I can give you examples of the messages from chat.
HrÃ¡Ä {FFFFFF}[D]eniSVK(74) {7171FF} potÅebuje VaÅ¡e služby (129 167 530$ v bance). Nacházà se v {FFFFFF}Shady Creeks.
In my language this means that player [D]eniSVK(his ID - this is, what I need) needs my services (his money in the bank), he is located in (location - 1-3 words)
The most of players have 1 000 000 - 999 999 999$ in the bank, so you don't have to fix it for players with more money than 999 999 999 and less than 1 000 000
You can find the same problem in this post:
http://ugbase.eu/help-7/get-player-id/
I still don't know how to use 0AD4, so, could you try to fix my code?
Thank you for the help and please, excuse my poor english grammar.