KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
So... I've tried this piece of code out and see if it works... It certainly doesn't work as I would expect it to..
Code:
And here's the result
https://streamable.com/n8stz
Is there need for more allocated bytes?
Code:
Code:
if SAMP.DialogRespond(830, 20@, 0, 25@)
then
if 20@ == 1
then
0C1A: 26@ = atoi 25@
if SAMP.IsPlayerConnected(26@)
then
0AF1: write_int 26@ to_ini_file "cleo\ServerCMD.ini" section "Bank" key "idtransfer"
0B36: samp 1@ = get_player_nickname 26@
0AC8: 2@ = allocate_memory_size 260
0AC8: 3@ = allocate_memory_size 260
0AD3: 3@ = format "Please insert the amount of money you'd like to transfer to %s." 1@
0AD3: 2@ = format "{000089}[{770089}Bank Manager{000089}]: Transferring to %s [ID: %d]" 1@ 26@
SAMP.ShowDialog(840, 2@, 3@, "Transfer", "Back", 1)
else
0AC6: 15@ = label @warningnotconnected offset
SAMP.DialogRespond(831, "{000089}[{770089}Bank Manager{000089}]: {ff0000}Warning!", 15@, "Back", "Cancel", 0)
end
end
0C11: memset destination 25@ value 0 size 50
if 20@ == 0
then
0AC6: 4@ = label @bankchoice offset
SAMP.ShowDialog(799, "{000089}[{770089}Bank Manager{000089}]:" , 4@, "Select" , "Exit", 2)
end
end
if SAMP.DialogRespond(840, 20@, 0, 25@)
then
if 20@ == 1
then
0C1A: 26@ = atoi 25@
0AF1: write_int 26@ to_ini_file "cleo\ServerCMD.ini" section "Bank" key "idamount"
0AF0: 19@ = get_int_from_ini_file "cleo\ServerCMD.ini" section "Bank" key "idtransfer"
if SAMP.IsPlayerConnected(19@)
then
0B36: samp 1@ = get_player_nickname 19@
0AC8: 5@ = allocate_memory_size 260
0AC8: 6@ = allocate_memory_size 260
0AD3: 5@ = format "{000089}[{770089}Bank Manager{000089}]: {c91111}Transferring to %s $ %d." 1@ 19@
0AD3: 6@ = format "{ff0000}Sending:{00ff00}$ %d {ff0000}--> {26b5b5}%s?" 19@ 1@
SAMP.ShowDialog(850, 5@, 6@, "Transfer", "Back" 0)
end
end
if 20@ == 0
then
0C11: memset destination 25@ value 0 size 50
SAMP.ShowDialog(830, "{000089}[{770089}Bank Manager{000089}]:", "Please insert the ID of the player you'd like to transfer", "Insert", "Back", 1)
end
end
if SAMP.DialogRespond(850, 21@, 0, 0)
then
if 21@ == 1
then
0AF0: 2@ = get_int_from_ini_file "cleo\ServerCMD.ini" section "Bank" key "idtransfer"
0AF0: 3@ = get_int_from_ini_file "cleo\ServerCMD.ini" section "Bank" key "idamount"
say "/transfer %d %d" 2@ 3@
end
if 21@ == 0
then
chatmsg "{000089}[{770089}Bank Manager{000089}]: {ff9000}Transaction has been cancelled." -1
end
end
And here's the result
https://streamable.com/n8stz
Is there need for more allocated bytes?