Hey there.
I'm trying to make a coordinates teleporter, where I can teleport to multiple locations. I use one command, /tp [location], where I can type locations such as "lspd", "lsfd", "bank", etc. I tried coding it, but I can't seem to get it to work. My script is bugged as hell, please take it as a concept and help me out.
This is what I got so far:
Thanks a lot in advance.
I'm trying to make a coordinates teleporter, where I can teleport to multiple locations. I use one command, /tp [location], where I can type locations such as "lspd", "lsfd", "bank", etc. I tried coding it, but I can't seem to get it to work. My script is bugged as hell, please take it as a concept and help me out.
This is what I got so far:
Code:
{$CLEO}
0000: NOP
0B34: samp register_client_command "/tp" to_label @cmd
0@ = 0
:MAIN
WAIT 0
IF 0@ == 1
THEN
018C: play_sound 1052 at 0.0 0.0 0.0
IF 3@ == 'mining'
THEN
0972: $PLAYER_ACTOR -1872.6539 -1686.1276 22.1866
END
IF 3@ == 'lspd'
THEN
0972: $PLAYER_ACTOR -1872.6539 -1686.1276 22.1866
END
WAIT 2000
0@ = 0
END
SAMP.CmdRet()
JUMP @MAIN
:CMD
WAIT 0
SAMP.IsCommandTyped(1@)
IF
0AD4: 2@ = scan_string 1@ format "%d" 3@v
ELSE_JUMP @USAGE
0@ = 1
SAMP.CmdRet()
JUMP @MAIN
:USAGE
WAIT 0
0AF8: samp add_message_to_chat "USAGE: /tp [location]" color -1
0AF8: samp add_message_to_chat "Locations: mining, lspd, lsfd, bank" color GREY
0@ = 0
SAMP.CmdRet()
JUMP @MAIN
Thanks a lot in advance.