HenryTeylor
Active member
- Joined
- Sep 13, 2014
- Messages
- 33
- Reaction score
- 0
Hello everyone. Are you Henry Taylor. Today I present to you my development called Commander. Let's move on to the functions :youdontsay:
/commander - to open a dialogue with the functions
/ getplayerid [id] - Player writes a handle to a variable
/ getcarid [id] - records the handle of the car in a variable
/ getcoord 0.0 0.0 0.0 - writes the variable coordinate where you want to teleport
All settings can be found in the ini file
Reconnect - Reconnects to the server with a specified time
Spawn - Teleports you to the spawn point
Texture - Teleports you a texture
Goto - Teleports you to the player
W.Coord - Records your location in the ini file
Imformation - Displays information about the player
Marker - Teleports to the established marker on the map
KickPlayer - Disconnects the player from server | Player must be in the car
Tp Coord - Teleports you to the location | To register, enter coordinates / getkoord
CarSit - Teleports you to an empty car on the driver's seat
CarSitPas - Teleports you to any car on the passenger seat
CarFire - Empty car starts to burn
CarGrnd - Car sticks to the ground
CarColor - Displays the chat color cars
SetCarColor- Repaint cars | Color configure in the ini file
RedMarker - Teleports you to the red marker
RaceMarker - Teleports you to the racing marker
Action - Be carrying out a special operation
SendPic - Raises the pickup at a distance
Screenshots
My Noob Source Code :trollface: :trollface: :trollface:
Code:
{$CLEO .cs}
{$INCLUDE includes/RakNetDefines.txt}
{$NOSOURCE}
0000: NOP
0662: "*************************************"
0662: "Author: HenryTeylor"
0662: "Site: ugbase.eu and cheat-master.ru"
0662: "*************************************"
thread "HenryTeylor"
if not 0@ = SAMP.Base()
then 0A93: end_custom_thread
end
while not SAMP.Available()
wait 100
end
wait 3000
0af8: "{ffffff}Commander {f08080}is loaded" 0xffffff
0af8: "Author: {f08080}HenryTeylor{ffffff}" 0xffffff
0af8: "Site: {f08080}ugbase.eu {ffffff}and {f08080}cheat-master.ru" 0xffffff
0af8: "{ffffff}Enter {f08080}/commander {ffffff}to activate" 0xffffff
const
RPC_PICKEDUPPICKUP = 0x92
UNRELIABLE_SEQUENCED = 1
PRIORITY_HIGH = 1
end
0B34: samp register_client_command "commander" to_label @commander_on
0B34: samp register_client_command "getplayerid" to_label @get_player_id
0B34: samp register_client_command "getcarid" to_label @get_car_id
0B34: samp register_client_command "getcoord" to_label @get_coord
Dialog.Create(1@, "{F08080}Commander | HenryTeylor")
Dialog.AddStatic(1@,1, "{ffffff}Select the desired{F08080} function", 230, 10, 600, 30)
Dialog.AddStatic(1@,1, "{F08080}Server", 310, 35, 600, 30)
Dialog.AddButton(1@,2,"{F08080}Reconnect", 260, 65, 150, 30 )
Dialog.AddStatic(1@,1, "{ffffff}Function with{F08080} actor", 270, 95, 600, 30)
Dialog.AddButton(1@,3,"{F08080}Spawn", 35, 125, 140, 30 )
Dialog.AddButton(1@,4,"{F08080}Texture", 195, 125, 140, 30 )
Dialog.AddButton(1@,5,"{F08080}Goto", 355, 125, 140, 30 )
Dialog.AddButton(1@,6,"{F08080}W.Cord", 525, 125, 140, 30 )
Dialog.AddButton(1@,7,"{F08080}Information", 35, 175, 140, 30 )
Dialog.AddButton(1@,8,"{F08080}Marker", 195, 175, 140, 30 )
Dialog.AddButton(1@,9,"{F08080}KickPlayer", 355, 175, 140, 30 )
Dialog.AddButton(1@,10,"{F08080}TP Coord", 525, 175, 140, 30 )
Dialog.AddStatic(1@,1, "{ffffff}Function with{F08080} car", 270, 205, 600, 30)
Dialog.AddButton(1@,11,"{F08080}CarSit", 35, 235, 140, 30 )
Dialog.AddButton(1@,12,"{F08080}CarSitPas", 195, 235, 140, 30 )
Dialog.AddButton(1@,13,"{F08080}CarFire", 355, 235, 140, 30 )
Dialog.AddButton(1@,14,"{F08080}CarGrnd", 525, 235, 140, 30 )
Dialog.AddButton(1@,15,"{F08080}CarColor", 195, 285, 140, 30 )
Dialog.AddButton(1@,16,"{F08080}CarSetColor", 355, 285, 140, 30 )
Dialog.AddStatic(1@,1, "{F08080}Other{ffffff} function", 280, 325, 600, 30)
Dialog.AddButton(1@,17,"{F08080}RedMarker", 35, 355, 140, 30 )
Dialog.AddButton(1@,18,"{F08080}RaceMarker", 195, 355, 140, 30 )
Dialog.AddButton(1@,19,"{F08080}Action", 355, 355, 140, 30 )
Dialog.AddButton(1@,20,"{F08080}SendPic", 525, 355, 140, 30 )
0B5A: get_screen_resolution 2@ 3@
0AF0: 2@ = get_int_from_ini_file "cleo\commander.config.ini" section "Position" key "X"
0AF0: 3@ = get_int_from_ini_file "cleo\commander.config.ini" section "Position" key "Y"
0B84: samp dialog 1@ set_pos_XY 2@ 3@ size 700 415
0B86: samp dialog 1@ set_visible false
while true
wait 0
if 4@ == 1
then
0B8D: samp set_cursor_mode 2
0B86: samp dialog 1@ set_visible true
if 0AB0: key_pressed 1
then
0B5E: get_cursor_pos 28@ 27@
0B85: samp dialog 1@ get_position_to 26@ 25@ size_to 0@ 0@
if and
001D: 28@ > 26@
001D: 27@ > 25@
then
26@ += 340
25@ += 20
if and
001D: 26@ > 28@
001D: 25@ > 27@
then
26@ -= 340
25@ -= 20
0062: 28@ -= 26@
0062: 27@ -= 25@
while 0AB0: key_pressed 1
wait 0
0B5E: get_cursor_pos 26@ 25@
0062: 26@ -= 28@
0062: 25@ -= 27@
0B84: samp dialog 1@ set_pos_XY 26@ 25@ size 700 415
end
end
end
end
if
Dialog.PopEvent(1@, 5@, 6@)
then
if and
6@ == 2
5@ == 257
then
if
0AF0: 7@ = get_int_from_ini_file "cleo\commander.config.ini" section "Reconnect" key "Delay"
then
0B28: samp disconnect_with_reason 0
wait 7@
0B27: samp set_gamestate 1
end
end
if and
6@ == 3
5@ == 257
then
0AF6: samp spawn_player
0af8: "{ffffff}Player {F08080}spawn" 0xffffff
end
if and
6@ == 4
5@ == 257
then
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
02CE: 13@ = ground_z_at 10@ 11@ 12@
13@ -= 10.0
Actor.PutAt($PLAYER_ACTOR, 7@, 8@, 13@)
0af8: "{ffffff}Teleported by {F08080}texture" 0xffffff
end
if and
6@ == 5
5@ == 257
then
if
not Actor.Driving($PLAYER_ACTOR)
then
if
not 16@ < 1
then
Actor.StorePos(16@, 17@, 18@, 19@)
wait 100
Actor.PutAt($PLAYER_ACTOR, 17@, 18@, 19@)
else
0af8: "{ffffff}In the variable is {f08080}not written handle Player" 0xffffff
end
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
end
if and
6@ == 6
5@ == 257
then
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
10@ = Actor.Angle($PLAYER_ACTOR)
0AF3: write_float 7@ to_ini_file "cleo\commander.config.ini" section "PlayerCordinate" key "X"
0AF3: write_float 8@ to_ini_file "cleo\commander.config.ini" section "PlayerCordinate" key "Y"
0AF3: write_float 9@ to_ini_file "cleo\commander.config.ini" section "PlayerCordinate" key "Z"
0AF3: write_float 10@ to_ini_file "cleo\commander.config.ini" section "PlayerCordinate" key "Angle"
0af8: "{ffffff}Coordinates are recorded {f08080}in the ini file" 0xffffff
end
if and
6@ == 7
5@ == 257
then
if
0B20: samp 16@ = actor_handle_by_samp_player_id 15@
then
alloc 20@ 124
alloc 21@ 8
alloc 22@ 64
20@ = Samp.GetPlayerNickname(15@)
$Ping = Samp.GetPlayerPing(15@)
$Score = Samp.GetPlayerScore(15@)
Actor.StorePos(16@, 17@, 18@, 19@)
0af8: "{f08080}Information Player" 0xffffff
0af8: "{ffffff}NickName: {f08080}%s" 0xffffff 20@
0af8: "{ffffff}Score: {f08080}%d" 0xffffff $Score
0af8: "{ffffff}Ping: {f08080}%d" 0xffffff $Ping
0af8: "{ffffff}Coord: {f08080}%.2f %.2f %.2f" 0xffffff 17@ 18@ 19@
free 20@
free 21@
free 22@
else
0af8: "{ffffff}In the variable is {f08080}not written handle Player" 0xffffff
end
end
if and
6@ == 8
5@ == 257
then
if
0AB6: store_target_marker_coords_to 7@ 8@ 9@
then
Actor.PutAt($PLAYER_ACTOR, 7@, 8@, 9@)
else
0af8: "{ffffff}You did not put a {f08080}marker {ffffff}on the map" 0xffffff
end
end
if and
6@ == 9
5@ == 257
then
if Samp.IsPlayerConnected(15@)
then
if Actor.Driving(16@)
then
if 0AB1: call_scm_func @GetPlayedVehIDbyID 1 pID 15@ reth_vID 0@
then
call @SendInCarFakePosition 1 0@
wait 0
end
else
0af8: "{ffffff}The player must be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}Player {f08080}not connected" 0xffffff
end
end
if and
6@ == 10
5@ == 257
then
Actor.PutAt($PLAYER_ACTOR, 20@, 21@, 22@)
end
if and
6@ == 11
5@ == 257
then
if
not $Handle < 1
then
if not Actor.Driving($PLAYER_ACTOR)
then
0B30: samp send_enter_vehicle $Carid as_passenger false
wait 200
072A: task_warp_char_into_car_as_driver $PLAYER_ACTOR car $Handle
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 12
5@ == 257
then
if not $Handle < 1
then
if not Actor.Driving($PLAYER_ACTOR)
then
0B30: samp send_enter_vehicle $Carid as_passenger true
wait 200
072B: task_warp_char_into_car_as_passenger $PLAYER_ACTOR car $Handle seat -1
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 13
5@ = 257
then
if not $Handle < 1
then
if not Actor.Driving($PLAYER_ACTOR)
then
00A0: get_char_coordinates $PLAYER_ACTOR store_to 7@ 8@ 9@
0B30: samp send_enter_vehicle $Carid as_passenger false
wait 200
072A: task_warp_char_into_car_as_driver $PLAYER_ACTOR car $Handle
Car.Health($Handle) = 200
wait 200
0B31: samp send_exit_vehicle $Carid
wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 7@ 8@ 9@
0B3D: raknet 33@ = new_bit_stream
0B40: raknet bit_stream 33@ write $Carid type BS_TYPE_INT size 4
0B41: raknet send_rpc RPC_VEHICLEDESTROYED bit_stream 33@ priority PRIORITY_HIGH reliability RELIABLE_SEQUENCED ordering_channel 0 shift_timestamp false
0B3E: raknet delete_bit_stream 33@
wait 200
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 14
5@ == 257
then
if not $Handle < 1
then
if not Actor.Driving($PLAYER_ACTOR)
then
00A0: get_char_coordinates $PLAYER_ACTOR store_to 7@ 8@ 9@
0B30: samp send_enter_vehicle $Carid as_passenger false
wait 200
072A: task_warp_char_into_car_as_driver $PLAYER_ACTOR car $Handle
wait 10
00AA: get_car_coordinates $Handle store_to 17@ 18@ 19@
17@ += 2.5
00AB: set_car_coordinates $Handle to 17@ 18@ 19@
Car.Angle($Handle) = 275.0
0731: set_car $Handle y_angle_to 85.0
Car.LockInCurrentPosition($Handle) = True
wait 400
0B31: samp send_exit_vehicle $Carid
wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 7@ 8@ 9@
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 15
5@ == 257
then
if not $Handle < 1
then
03F3: get_car_colours $Handle store_to 10@ 11@
0af8: "{ffffff}Car color: {f08080}%d %d" 0xffffff 10@ 11@
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 16
5@ == 257
then
if not $Handle < 1
then
0AF0: 18@ = get_int_from_ini_file "cleo\commander.config.ini" section "CarColor" key "Color1"
0AF0: 19@ = get_int_from_ini_file "cleo\commander.config.ini" section "CarColor" key "Color2"
if not Actor.Driving($PLAYER_ACTOR)
then
00A0: get_char_coordinates $PLAYER_ACTOR store_to 7@ 8@ 9@
0B30: samp send_enter_vehicle $Carid as_passenger false
wait 200
072A: task_warp_char_into_car_as_driver $PLAYER_ACTOR car $Handle
0AFC: samp send_scm_event $Carid event_id 3 params 18@ 19@
wait 200
0229: change_car_colour $Handle primary_to 18@ secondary_to 19@
0B31: samp send_exit_vehicle $Carid
wait 200
0362: warp_char_from_car_to_coord $PLAYER_ACTOR coord 7@ 8@ 9@
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
else
0af8: "{ffffff}The handle of the machine is {f08080}not recorded in the variable" 0xffffff
end
end
if and
6@ == 17
5@ == 257
then
if not actor.Driving($PLAYER_ACTOR)
then
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
0AB1: call @RedMarker 0 $X $Y $Z
0509: $Tp = distance_between_XY 7@ 8@ and_XY $X $Y
if not $Tp > 300
then
Actor.PutAt($PLAYER_ACTOR, $X, $Y, $Z)
else
0af8: "{ffffff}Distance to the red marker {f08080}more than 300 meters" 0xffffff
end
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
end
if and
6@ == 18
5@ == 257
then
if Actor.Driving($PLAYER_ACTOR)
then
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
0AB1: call @RaceMarker 0 $RX $RY $RZ
0509: $RTP = distance_between_XY 7@ 8@ and_XY $RX $RY
if not $RTP > 500
then
Actor.PutAt($PLAYER_ACTOR, $RX, $RY, $RZ)
else
0af8: "{ffffff}Distance to the red marker {f08080}more than 500 meters" 0xffffff
end
else
0af8: "{ffffff}You are not {f08080}in the car" 0xffffff
end
end
if and
6@ == 19
5@ == 257
then
if not Actor.Driving($PLAYER_ACTOR)
then
0AF0: $Action = get_int_from_ini_file "cleo\commander.config.ini" section "Action" key "ID"
0AFD: samp set_special_action $Action
else
0af8: "{ffffff}You should not be {f08080}in the car" 0xffffff
end
end
if and
6@ == 20
5@ == 257
then
0AF0: $PickUP = get_int_from_ini_file "cleo\commander.config.ini" section "PickUP" key "ID"
0ab1: @pickup 1 $PickUP
end
end
end
end
:commander_on
0B12: 4@ = 4@ xor 1
if
4@ == 1
then
0B86: samp dialog 1@ set_visible true
0B8D: samp set_cursor_mode 2
else
0B86: samp dialog 1@ set_visible false
0B8D: samp set_cursor_mode 0
end
Samp.CmdRet()
:get_player_id
0B35: samp 14@ = get_last_command_params
if
0AD4: 14@ = scan_string 14@ format "%d" 15@
then
if
0B20: samp 16@ = actor_handle_by_samp_player_id 15@
then
0af8: "{ffffff}The handle of the character is {f08080}written into the variable" 0xffffff
else
0af8: "{ffffff}Player not {f08080}in the area of Stream" 0xffffff
end
else
0af8: "{ffffff}Correct entry: {f08080}/getplayerid [id]" 0xffffff
end
Samp.CmdRet()
:get_car_id
0B35: samp 31@ = get_last_command_params
if
0AD4: 31@ = scan_string 31@ format "%d" $Carid
then
if
0AFF: samp $Handle = car_handle_from_samp_carid $Carid
then
0af8: "{ffffff}The handle of the car is {f08080}recorded in the variable" 0xffffff
else
0af8: "{ffffff}Car not {f08080}in the area of Stream" 0xffffff
end
else
0af8: "{ffffff}Correct entry: {f08080}/getcarid [id]" 0xffffff
end
Samp.CmdRet()
:get_coord
0B35: samp 30@ = get_last_command_params
if
0AD4: 33@ = scan_string 30@ format "%f %f %f" 20@ 21@ 22@
then
0af8: "Coordinates are recorded {f08080}in variables" 0xffffff
else
0af8: "{ffffff}Correct entry: {f08080}/getcoord 0.0 0.0 0.0" 0xffffff
end
Samp.CmdRet()
:SendInCarFakePosition
0AC8: 20@ = allocate_memory_size 54
0C0D: struct 20@ offset 0 size 2 = 0@ //id
0C0D: struct 20@ offset 2 size 4 = 0.0//1@ // dir
0C0D: struct 20@ offset 6 size 4 = 0.0//2@
0C0D: struct 20@ offset 10 size 4 = 0.0//3@
0C0D: struct 20@ offset 14 size 4 = 0.0 //roll
0C0D: struct 20@ offset 18 size 4 = 0.0
0C0D: struct 20@ offset 22 size 4 = 0.0
0C0D: struct 20@ offset 26 size 4 = 1000.0 // pos
0C0D: struct 20@ offset 30 size 4 = 50.0// pos
0C0D: struct 20@ offset 34 size 4 = 30.0 // pos
0C0D: struct 20@ offset 38 size 4 = 0.0 // Speec
0C0D: struct 20@ offset 42 size 4 = 0.0 //
0C0D: struct 20@ offset 46 size 4 = 0.0 //
0C0D: struct 20@ offset 50 size 4 = 0 //pad
0B3D: raknet 21@ = new_bit_stream
0B40: raknet bit_stream 21@ write PACKET_TRAILER_SYNC type BS_TYPE_BYTE size 1
0B40: raknet bit_stream 21@ write 20@ type BS_TYPE_ARRAY size 54
0B8B: raknet send bit_stream 21@
0B3E: raknet delete_bit_stream 21@
0AC9: free_allocated_memory 20@
0AB2: ret 0
:GetPlayedVehIDbyID
1@ = Samp.GetPlayerStruct(0@)
1@ += 8 // stRmvPlData
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 1
2@ += 2 // sVehId
0A8D: 3@ = read_memory 2@ size 2 virtual_protect 1
if or
1@ < 1 // actor not denied
3@ < 1 // vid < 1 (not respond)
then
059A: return_false
ret 1 0@
end
0485: return_true
ret 1 3@
:RedMarker
12@ = 9999.0
for 0@ = 0 to 31
0085: 1@ = 0@
1@ *= 160
1@ += 0xC7DD58
1@ += 48
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 5@ 6@ 7@
if
0025: 12@ > 8@
then
0087: 12@ = 8@
0087: 9@ = 2@
0087: 10@ = 3@
0087: 11@ = 4@
end
end
0AB2: ret 3 9@ 10@ 11@
:RaceMarker
12@ = 9999.0
for 0@ = 0 to 31
0085: 1@ = 0@
1@ *= 56
1@ += 0xC7F158
1@ += 16
0A8D: 2@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
1@ += 4
0A8D: 4@ = read_memory 1@ size 4 virtual_protect 0
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
050A: 8@ = distance_between_XYZ 2@ 3@ 4@ and_XYZ 5@ 6@ 7@
if
0025: 12@ > 8@
then
0087: 12@ = 8@
0087: 9@ = 2@
0087: 10@ = 3@
0087: 11@ = 4@
end
end
0AB2: ret 3 9@ 10@ 11@
:pickup
1@ = Raknet.NewBitStream()
Raknet.Write(1@, 0@, BS_TYPE_INT, 4)
Raknet.RPC(RPC_PICKEDUPPICKUP, 1@, PRIORITY_HIGH, UNRELIABLE_SEQUENCED, 0, false)
Raknet.DeleteBitStream(1@)
0ab2: 0