[CLEO] Some snippets

Status
Not open for further replies.

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Chat String Type:
2 - text + prefix
4 - text (server msg)
8 - text (debug)


0.3.7 - R1
PHP:
:getChatStringType
{
    0.3.7 - R1
    0AB1: @getChatStringType 1 ChatID 99 _Returned: Type 0@
    2 - text + prefix
    4 - text (server msg)
    8 - text (debug)
}
IF 0AA2: 1@ = "samp.dll"
THEN     
    1@ += 0x21A0E4
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0xF0
    0A8D: 2@ readMem 1@ sz 4 vp 0
    0AA3: 1@
END
0AB2: ret 1 2@

0.3.7 - R2
PHP:
:getChatStringType
{
    0.3.7 - R2
    0AB1: @getChatStringType 1 ChatID 99 _Returned: Type 0@
    2 - text + prefix
    4 - text (server msg)
    8 - text (debug)
}
IF 0AA2: 1@ = "samp.dll"
THEN     
    1@ += 0x21A0EC
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0xF0
    0A8D: 2@ readMem 1@ sz 4 vp 0
    0AA3: 1@
END
0AB2: ret 1 2@

0.3.7 - R3
PHP:
:getChatStringType
{
    0.3.7 - R3
    0AB1: @getChatStringType 1 ChatID 99 _Returned: Type 0@
    2 - text + prefix
    4 - text (server msg)
    8 - text (debug)
}
IF 0AA2: 1@ = "samp.dll"
THEN     
    1@ += 0x26E8C8
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0xF0
    0A8D: 2@ readMem 1@ sz 4 vp 0
    0AA3: 1@
END
0AB2: ret 1 2@

0.3.DL
PHP:
:getChatStringType
{
    0.3.DL
    0AB1: @getChatStringType 1 ChatID 99 _Returned: Type 0@
    2 - text + prefix
    4 - text (server msg)
    8 - text (debug)
}
IF 0AA2: 1@ = "samp.dll"
THEN     
    1@ += 0x2ACA10
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0xF0
    0A8D: 2@ readMem 1@ sz 4 vp 0
    0AA3: 1@
END
0AB2: ret 1 2@

0.3.7 - R4
PHP:
:getChatStringType
{
    0.3.7 - R4
    0AB1: @getChatStringType 1 ChatID 99 _Returned: Type 0@
    2 - text + prefix
    4 - text (server msg)
    8 - text (debug)
}
IF 0AA2: 1@ = "samp.dll"
THEN     
    1@ += 0x26E9F8
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x132
    0@ *= 0xFC
    005A: 1@ += 0@
    1@ += 0xF0
    0A8D: 2@ readMem 1@ sz 4 vp 0
    0AA3: 1@
END
0AB2: ret 1 2@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Don't use snippet with snipper..
PHP:
:GetAimingPosition
{
    0AB1: @GetAimingPosition 0 _Returned: XYZ 1@ 2@ 3@
}
00A0: store_actor $PLAYER_ACTOR position_to 31@ 30@ 29@
0470: 28@ = actor $PLAYER_ACTOR current_weapon
28@ *= 0x70
28@ += 0xC8AAB8
28@ += 0x4
0A8D: 27@ = read_memory 28@ size 4 virtual_protect 0 // Current weapon target range
//                                                            {$13-$15} {$16-$18} {z}  {y}  {x} {target range}
0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 0xA49994  0xA499A0  29@  30@  31@  27@
ret 3 $13 $14 $15
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
If you siting in car and wanna get information from passengers or driver..
Instead of checking every online player you can use this snippet..


PHP:
:GetActorHandleFromVehicleSeat
{
    0AB1: @GetActorHandleFromVehicleSeat 0 Driver Seat-ActorHandle: 1@ Front-right Seat-ActorHandle: 2@ Rear-left Seat-ActorHandle: 3@ Rear-right Seat-ActorHandle: 4@
}
03C0: 31@ = actor $PLAYER_ACTOR car
0A97: 31@ = car 31@ struct
0A8E: 30@ = 31@ + 1120 // Pointer to driver seat
0A8E: 29@ = 31@ + 1124 // Pointer to passenger 1 (Front-right seat)
0A8E: 28@ = 31@ + 1128 // Pointer to passenger 2 (Rear-left seat)
0A8E: 27@ = 31@ + 1132 // Pointer to passenger 3 (Rear-right seat)
0A8D: 30@ = readMem 30@ sz 4 vp 0 // Driver seat
0A8D: 29@ = readMem 29@ sz 4 vp 0 // Front-right seat
0A8D: 28@ = readMem 28@ sz 4 vp 0 // Rear-left seat
0A8D: 27@ = readMem 27@ sz 4 vp 0 // Rear-right seat
IF 30@ > 0
THEN 0AEA: 26@ = actor_struct 30@ handle
ELSE 26@ = 0
END
IF 29@ > 0
THEN 0AEA: 25@ = actor_struct 29@ handle
ELSE 25@ = 0
END
IF 28@ > 0
THEN 0AEA: 24@ = actor_struct 28@ handle
ELSE 24@ = 0
END
IF 27@ > 0
THEN 0AEA: 23@ = actor_struct 27@ handle
ELSE 23@ = 0
END
0AB2: ret 4 26@ 25@ 24@ 23@
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
If you siting in car and wanna get information from passengers or driver..
Instead of checking every online player you can use this snippet..


PHP:
:GetActorHandleFromVehicleSeat
{
    0AB1: @GetActorHandleFromVehicleSeat 0 Driver Seat-ActorHandle: 1@ Front-right Seat-ActorHandle: 2@ Rear-left Seat-ActorHandle: 3@ Rear-right Seat-ActorHandle: 4@
}
03C0: 31@ = actor $PLAYER_ACTOR car
0A97: 31@ = car 31@ struct
0A8E: 30@ = 31@ + 1120 // Pointer to driver seat
0A8E: 29@ = 31@ + 1124 // Pointer to passenger 1 (Front-right seat)
0A8E: 28@ = 31@ + 1128 // Pointer to passenger 2 (Rear-left seat)
0A8E: 27@ = 31@ + 1132 // Pointer to passenger 3 (Rear-right seat)
0A8D: 30@ = readMem 30@ sz 4 vp 0 // Driver seat
0A8D: 29@ = readMem 29@ sz 4 vp 0 // Front-right seat
0A8D: 28@ = readMem 28@ sz 4 vp 0 // Rear-left seat
0A8D: 27@ = readMem 27@ sz 4 vp 0 // Rear-right seat
IF 30@ > 0
THEN 0AEA: 26@ = actor_struct 30@ handle
ELSE 26@ = 0
END
IF 29@ > 0
THEN 0AEA: 25@ = actor_struct 29@ handle
ELSE 25@ = 0
END
IF 28@ > 0
THEN 0AEA: 24@ = actor_struct 28@ handle
ELSE 24@ = 0
END
IF 27@ > 0
THEN 0AEA: 23@ = actor_struct 27@ handle
ELSE 23@ = 0
END
0AB2: ret 4 26@ 25@ 24@ 23@
How about:
Code:
:GetActorHandleAtSeatNumber // 0AB1: @GetActorHandleAtSeatNumber 2 _OfVehicle 0@ _AtSeatNumber 1@ _StoreActorHandle 31@
if 1@ == 0 // driver seat
then
046C: 31@ = car 0@ driver
0485: return_true
0AB2: cleo_return 1 31@
else // passenger seat
01ea: 31@ = car 0@ max_passengers
if 002d: 31@ >= 1@
then
  1@-- // start from index 0
  if 8431: not car 0@ passenger_seat_free 1@
  then
   0432: 31@ = get_actor_handle_from_car 0@ passenger_seat 1@
   0485: return_true
   0AB2: cleo_return 1 31@
  end
end
end
059A: return_false
0AB2: cleo_return 1 -1
Works for Vehicles with more than 4 Seats(Like Bus).
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Change chat and dialog colors...

ChatBox
PHP:
:SetChatInputColors
{
    0.3.7 - R1
    0AB1: @SetChatInputColors 2 TextColor 0xFF00FFFF BordersColor 0xFF00FF00
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0A8E: 30@ = 31@ + 0x21A0E8           // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 29@ = readMem 30@ sz 4 vp 0    // pChatInput;
    0A8E: 28@ = 29@ + 0x8                // pChatInput->pEditBox;
    0A8D: 27@ = readMem 28@ sz 4 vp 0    // pEditBox;
    0A8E: 26@ = 27@ + 0x20
    0A8D: 25@ = readMem 26@ sz 4 vp 0
    0A8E: 24@ = 25@ + 0x4
    0A8D: 23@ = readMem 24@ sz 4 vp 0
  
    0A8E: 22@ = 23@ + 0x1C               // Left up Corner
    0A8E: 21@ = 22@ + 0x78               // Top
    0A8E: 20@ = 21@ + 0x78               // Right up corner
    0A8E: 19@ = 20@ + 0x78               // Right side
    0A8E: 18@ = 19@ + 0x78               // Down left corner
    0A8E: 17@ = 18@ + 0x78               // Bottom
    0A8E: 16@ = 17@ + 0x78               // Down right corner
    0A8E: 15@ = 16@ + 0x78               // Left side
    0A8E: 14@ = 27@ + 0x127              // pEditBox->TextColor;
    0A8E: 13@ = 27@ + 0x133              // pEditBox->CharacterAtTextEndColor;
    0A8E: 12@ = 29@ + 0x14E0             // pChatInput->IsEditBoxOpen;
    0A8D: 12@ = readMem 12@ sz 4 vp 0
    IF 12@ == TRUE
    THEN
        0A8C: writemem 14@ sz 4 vl 0@ vp 0 // TextColor
        0A8C: writemem 13@ sz 4 vl 0@ vp 0 // CharacterAtTextEnd { | }
        0A8C: writemem 22@ sz 4 vl 1@ vp 0 // Left up Corner
        0A8C: writemem 21@ sz 4 vl 1@ vp 0 // Top
        0A8C: writemem 20@ sz 4 vl 1@ vp 0 // Right up corner
        0A8C: writemem 19@ sz 4 vl 1@ vp 0 // Right side
        0A8C: writemem 18@ sz 4 vl 1@ vp 0 // Down left corner
        0A8C: writemem 17@ sz 4 vl 1@ vp 0 // Bottom
        0A8C: writemem 16@ sz 4 vl 1@ vp 0 // Down right corner
        0A8C: writemem 15@ sz 4 vl 1@ vp 0 // Left side
    END
END
0AB2: 0

Dialog
PHP:
:SetDialogInputColors
{
    0.3.7 - R1
    0AB1: @SetDialogInputColors 2 TextColor 0xFF00FFFF BordersColor 0xFF00FF00
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0A8E: 30@ = 31@ + 0x21A0B8           // SAMP_DIALOG_INFO_OFFSET
    0A8D: 29@ = readMem 30@ sz 4 vp 0    // pDialogInput;
    0A8E: 28@ = 29@ + 0x24               // pDialogInput->pEditBox;
    0A8D: 27@ = readMem 28@ sz 4 vp 0    // pEditBox;
    0A8E: 26@ = 27@ + 0x20
    0A8D: 25@ = readMem 26@ sz 4 vp 0
    0A8E: 24@ = 25@ + 0x4
    0A8D: 23@ = readMem 24@ sz 4 vp 0
 
    0A8E: 22@ = 23@ + 0x1C               // Left up Corner
    0A8E: 21@ = 23@ + 0x94               // Top
    0A8E: 20@ = 23@ + 0x10C              // Right up corner
    0A8E: 19@ = 23@ + 0x1FC              // Right side
    0A8E: 18@ = 23@ + 0x364              // Down left corner
    0A8E: 17@ = 23@ + 0x2EC              // Bottom
    0A8E: 16@ = 23@ + 0x274              // Down right corner
    0A8E: 15@ = 23@ + 0x184              // Left side
    0A8E: 14@ = 27@ + 0x127              // pEditBox->TextColor;
    0A8E: 13@ = 27@ + 0x133              // pEditBox->CharacterAtTextEndColor;
    0A8E: 12@ = 27@ + 0x4                // pEditBox->IsEditboxOpen;
    0A8D: 12@ = readMem 12@ sz 1 vp 0
    IF 12@ == TRUE
    THEN
        0A8C: writemem 14@ sz 4 vl 0@ vp 0 // TextColor
        0A8C: writemem 13@ sz 4 vl 0@ vp 0 // CharacterAtTextEnd { | }
        0A8C: writemem 22@ sz 4 vl 1@ vp 0 // Left up Corner
        0A8C: writemem 21@ sz 4 vl 1@ vp 0 // Top
        0A8C: writemem 20@ sz 4 vl 1@ vp 0 // Right up corner
        0A8C: writemem 19@ sz 4 vl 1@ vp 0 // Right side
        0A8C: writemem 18@ sz 4 vl 1@ vp 0 // Down left corner
        0A8C: writemem 17@ sz 4 vl 1@ vp 0 // Bottom
        0A8C: writemem 16@ sz 4 vl 1@ vp 0 // Down right corner
        0A8C: writemem 15@ sz 4 vl 1@ vp 0 // Left side
    END
END
0AB2: 0
 

Attachments

  • sa-mp.jpg
    sa-mp.jpg
    126.9 KB · Views: 92
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
// vehicle 1 - center
// tire 2 - wheel_rf_dummy
// tire 4 - wheel_rb_dummy
// tire 5 - wheel_lf_dummy
// tire 7 - wheel_lb_dummy
// vehicle 8 - near_rf_mirrow
// vehicle 9 - near_door_r_handle
// vehicle 10 - near_lf_mirrow
// vehicle 11 - near_door_l_handle
// vehicle 12 - near_rf_wheel
// vehicle 13 - near_lb_wheel
// vehicle 16 - front_center_between_window_and_hood
// vehicle 17 - back_center_between_window_and_trunk
// vehicle 18 - front_window

PHP:
:GetComponentCoordsOfCar
// 0AB1: @GetComponentCoordsOfCar 2 VehicleHandle 0@ ComponentID 7@ _Returned: XYZ 4@ 5@ 6@
IF AND
NOT 1@ < 1
NOT 1@ > 19
THEN
    IF 056E:   car 0@ defined
    THEN
        0A97: 0@ = car 0@ struct
        0A8E: 5@ = 0@ + 0x590 // [byte] The class of transport
        0A8D: 6@ = read_memory 5@ size 4 virtual_protect 0
        IF 6@ == 0 // CAutomobile
        THEN 0AA6: call_method 0x6A2210 struct {CVehicle}0@ num_params 2 pop 0 | {CVector X Y Z}2@v {int::componentId}1@ |
        END
    END
END
0AB2: ret 3 2@ 3@ 4@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetMidCoordsBetweenTwoCoords
// 0AB1: @GetMidCoordsBetweenTwoCoords 6 Start_XYZ 1@ 2@ 3@ End_XYZ 4@ 5@ 6@ _Returned: MidCoordsXYZ 7@ 8@ 9@
005B: 0@ += 3@  // (float)
005B: 1@ += 4@  // (float)
005B: 2@ += 5@  // (float)
0@ /= 2.0
1@ /= 2.0
2@ /= 2.0
0AB2: ret 3 0@ 1@ 2@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
SAMP LIMITS 0.3.7 R1 - 0.3.7 R4
PHP:
SAMP_MAX_ACTORS = 1000
SAMP_MAX_PLAYERS = 1004
SAMP_MAX_VEHICLES = 2000
SAMP_MAX_PICKUPS = 4096
SAMP_MAX_OBJECTS = 1000
SAMP_MAX_GANGZONES = 1024
SAMP_MAX_3DTEXTS = 2048
SAMP_MAX_TEXTDRAWS = 2304 
SAMP_MAX_CLIENTCMDS = 144
SAMP_MAX_MENUS = 128
SAMP_MAX_PLAYER_NAME = 24
SAMP_ALLOWED_PLAYER_NAME_LENGTH = 20

SAMP LIMITS 0.3.DL
PHP:
SAMP_MAX_ACTORS = 1000,
SAMP_MAX_PLAYERS = 1004,
SAMP_MAX_VEHICLES = 2000,
SAMP_MAX_PICKUPS = 4096,
SAMP_MAX_OBJECTS = 2100,
SAMP_MAX_GANGZONES = 1024,
SAMP_MAX_3DTEXTS = 2048,
SAMP_MAX_TEXTDRAWS = 2304 ,
SAMP_MAX_CLIENTCMDS = 144,
SAMP_MAX_MENUS = 128,
SAMP_MAX_PLAYER_NAME = 24,
SAMP_ALLOWED_PLAYER_NAME_LENGTH = 20,
SAMP_MAX_MAPICONS = 100,
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0C5D: samp textdraw 0@ is_exists
0C5A: samp textdraw 0@ get_string_to 1@
0C5E: samp textdraw 0@ delete
0C5B: samp textdraw 0@ get_pos 1@ 2@
Without SAMPFUNCS

~ Samp TextDraw ~
1. Check TextDraw exist or not
2. Get TextDraw text
3. Hide / Delete TextDraw
4. Get textdraw position


0.3.7 - R1
PHP:
:IsSampTextDrawExist
{
    0.3.7 - R1
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.7 - R1
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0 // SAMP_TEXTDRAW_TEXT_OFFSET
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.7 - R1
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.7 - R1
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x10 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R2
PHP:
:IsSampTextDrawExist
{
    0.3.7 - R2
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.7 - R2
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_TEXT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.7 - R2
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.7 - R2
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R3
PHP:
:IsSampTextDrawExist
{
    0.3.7 - R3
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.7 - R3
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_TEXT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.7 - R3
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.7 - R3
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0

0.3.DL
PHP:
:IsSampTextDrawExist
{
    0.3.DL
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.DL
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_TEXT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.DL
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.DL
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R4
PHP:
:IsSampTextDrawExist
{
    0.3.7 - R4
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.7 - R4
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_TEXT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.7 - R4
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.7 - R4
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x20 // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R4 v2
PHP:
:IsSampTextDrawExist
{
    0.3.7 - R4
    0AB1: @IsSampTextDrawExist 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawText
{
    0.3.7 - R4
    0AB1: @GetTextDrawText 1 TextDrawID 0@ _Returned: Text 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400 // SAMP_TEXTDRAW_TEXT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x0
    0AB2: 1 1@
ELSE 059A:  return_false
END
0AB2: 0

:HideSampTextDraw
{
    0.3.7 - R4
    0AB1: @HideSampTextDraw 1 TextDrawID 0@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    0A8C: writeMem 1@ sz 4 vl 0 vp 0
ELSE 059A:  return_false
END
0AB2: 0

:GetTextDrawPosition
{
    0.3.7 - R4
    0AB1: @GetTextDrawPosition 1 TextDrawID 0@ _Returned: XY 1@
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x1C // SAMP_PPOOL_TEXTDRAW_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // TEXTDRAW_ID * 4
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN
    0485:  return_true
    1@ += 0x2400  // SAMP_TEXTDRAW_STRUCT_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0A8E: 2@ = 1@ + 0x98B // SAMP_TEXTDRAW_X_POSITION_OFFSET
    0A8E: 3@ = 1@ + 0x98F // SAMP_TEXTDRAW_Y_POSITION_OFFSET
    0A8D: 2@ readMem 2@ sz 4 vp 0
    0A8D: 3@ readMem 3@ sz 4 vp 0
    0AB2: 2 2@ 3@
ELSE 059A:  return_false
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
~ Samp PickUp ~

0.3.7 - R1
PHP:
:getPickUpStructure
{
    0.3.7 - R1
    0AB1: @getPickUpStructure 1 PickupID 0@ _Returned: Model 1@ Type 2@ XYZ 3@ 4@ 5@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3CD // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x20 // SAMP_PPOOL_PICKUP_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x14 // PICKUP_ID * 0x14
    0@ += 0xF004
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0 // MODEL
    10@ += 4
    0A8D: 5@ = read_memory 10@ size 4 virtual_protect 0 // TYPE
    10@ += 4
    0A8D: 6@ = read_memory 10@ size 4 virtual_protect 0 // X
    10@ += 4
    0A8D: 7@ = read_memory 10@ size 4 virtual_protect 0 // Y
    10@ += 4
    0A8D: 8@ = read_memory 10@ size 4 virtual_protect 0 // Z
    IF AND
    NOT 4@ < 0
    NOT 5@ < 0
    NOT 6@ == 0.0
    NOT 7@ == 0.0
    NOT 8@ == 0.0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 5 4@ 5@ 6@ 7@ 8@

0.3.7 - R2
PHP:
:getPickUpStructure
{
    0.3.7 - R2
    0AB1: @getPickUpStructure 1 PickupID 0@ _Returned: Model 1@ Type 2@ XYZ 3@ 4@ 5@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3C5 // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x10 // SAMP_PPOOL_PICKUP_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x14 // PICKUP_ID * 0x14
    0@ += 0xF004
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0 // MODEL
    10@ += 4
    0A8D: 5@ = read_memory 10@ size 4 virtual_protect 0 // TYPE
    10@ += 4
    0A8D: 6@ = read_memory 10@ size 4 virtual_protect 0 // X
    10@ += 4
    0A8D: 7@ = read_memory 10@ size 4 virtual_protect 0 // Y
    10@ += 4
    0A8D: 8@ = read_memory 10@ size 4 virtual_protect 0 // Z
    IF AND
    NOT 4@ < 0
    NOT 5@ < 0
    NOT 6@ == 0.0
    NOT 7@ == 0.0
    NOT 8@ == 0.0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 5 4@ 5@ 6@ 7@ 8@

0.3.7 - R3
PHP:
:getPickUpStructure
{
    0.3.7 - R3
    0AB1: @getPickUpStructure 1 PickupID 0@ _Returned: Model 1@ Type 2@ XYZ 3@ 4@ 5@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x10 // SAMP_PPOOL_PICKUP_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x14 // PICKUP_ID * 0x14
    0@ += 0xF004
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0 // MODEL
    10@ += 4
    0A8D: 5@ = read_memory 10@ size 4 virtual_protect 0 // TYPE
    10@ += 4
    0A8D: 6@ = read_memory 10@ size 4 virtual_protect 0 // X
    10@ += 4
    0A8D: 7@ = read_memory 10@ size 4 virtual_protect 0 // Y
    10@ += 4
    0A8D: 8@ = read_memory 10@ size 4 virtual_protect 0 // Z
    IF AND
    NOT 4@ < 0
    NOT 5@ < 0
    NOT 6@ == 0.0
    NOT 7@ == 0.0
    NOT 8@ == 0.0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 5 4@ 5@ 6@ 7@ 8@

0.3.DL
PHP:
:getPickUpStructure
{
    0.3.DL
    0AB1: @getPickUpStructure 1 PickupID 0@ _Returned: Model 1@ Type 2@ XYZ 3@ 4@ 5@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x10 // SAMP_PPOOL_PICKUP_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x14 // PICKUP_ID * 0x14
    0@ += 0xF004
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0 // MODEL
    10@ += 4
    0A8D: 5@ = read_memory 10@ size 4 virtual_protect 0 // TYPE
    10@ += 4
    0A8D: 6@ = read_memory 10@ size 4 virtual_protect 0 // X
    10@ += 4
    0A8D: 7@ = read_memory 10@ size 4 virtual_protect 0 // Y
    10@ += 4
    0A8D: 8@ = read_memory 10@ size 4 virtual_protect 0 // Z
    IF AND
    NOT 4@ < 0
    NOT 5@ < 0
    NOT 6@ == 0.0
    NOT 7@ == 0.0
    NOT 8@ == 0.0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 5 4@ 5@ 6@ 7@ 8@

0.3.7 - R4
PHP:
:getPickUpStructure
{
    0.3.7 - R4
    0AB1: @getPickUpStructure 1 PickupID 0@ _Returned: Model 1@ Type 2@ XYZ 3@ 4@ 5@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x10 // SAMP_PPOOL_PICKUP_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x14 // PICKUP_ID * 0x14
    0@ += 0xF004
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0 // MODEL
    10@ += 4
    0A8D: 5@ = read_memory 10@ size 4 virtual_protect 0 // TYPE
    10@ += 4
    0A8D: 6@ = read_memory 10@ size 4 virtual_protect 0 // X
    10@ += 4
    0A8D: 7@ = read_memory 10@ size 4 virtual_protect 0 // Y
    10@ += 4
    0A8D: 8@ = read_memory 10@ size 4 virtual_protect 0 // Z
    IF AND
    NOT 4@ < 0
    NOT 5@ < 0
    NOT 6@ == 0.0
    NOT 7@ == 0.0
    NOT 8@ == 0.0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 5 4@ 5@ 6@ 7@ 8@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0AFF: samp 2@ = car_handle_by_samp_vehicle_id 1@
Without SAMPFUNCS

~ Samp Vehicle ~


0.3.7 - R1
PHP:
:SAMPGetCarHandleByVehicleID

{
    0.3.7 - R1
    0AB1: @SAMPGetCarHandleByVehicleID 1 VehicleID 1249 _Returned: Handle 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3CD // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x1C // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x4FB4 // SAMP_VEHICLE_HANDLE_OFFSET
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 4@

0.3.7 - R2
PHP:
:SAMPGetCarHandleByVehicleID

{
    0.3.7 - R2
    0AB1: @SAMPGetCarHandleByVehicleID 1 VehicleID 1249 _Returned: Handle 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3C5 // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x4FB4 // SAMP_VEHICLE_HANDLE_OFFSET
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 4@

0.3.7 - R3
PHP:
:SAMPGetCarHandleByVehicleID

{
    0.3.7 - R3
    0AB1: @SAMPGetCarHandleByVehicleID 1 VehicleID 1249 _Returned: Handle 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x4FB4 // SAMP_VEHICLE_HANDLE_OFFSET
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 4@

0.3.DL
PHP:
:SAMPGetCarHandleByVehicleID

{
    0.3.DL
    0AB1: @SAMPGetCarHandleByVehicleID 1 VehicleID 1249 _Returned: Handle 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x4FB4 // SAMP_VEHICLE_HANDLE_OFFSET
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 4@

0.3.7 - R4
PHP:
:SAMPGetCarHandleByVehicleID

{
    0.3.7 - R4
    0AB1: @SAMPGetCarHandleByVehicleID 1 VehicleID 1249 _Returned: Handle 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x4FB4 // SAMP_VEHICLE_HANDLE_OFFSET
    005A: 10@ += 0@
    0A8D: 4@ = read_memory 10@ size 4 virtual_protect 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 4@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
~ Samp Vehicle ~

0.3.7 - R1

PHP:
:SAMPGetCarNumberPlateByVehicleID

{
    0.3.7 - R1
    0AB1: @SAMPGetCarNumberPlateByVehicleID 1 VehicleID 1249 _Returned: NumberPlate 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3CD // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x1C // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x1134
    005A: 10@ += 0@
    0A8D: 10@ = readMem 10@ sz 4 vp 0
    10@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
    0A8D: 4@ = readMem 10@ sz 1 vp 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE
        059A:  return_false
        10@ = 0
    END
END
0AB2: ret 1 10@

0.3.7 - R2
PHP:
:SAMPGetCarNumberPlateByVehicleID

{
    0.3.7 - R2
    0AB1: @SAMPGetCarNumberPlateByVehicleID 1 VehicleID 1249 _Returned: NumberPlate 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3C5 // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x1134
    005A: 10@ += 0@
    0A8D: 10@ = readMem 10@ sz 4 vp 0
    10@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
    0A8D: 4@ = readMem 10@ sz 1 vp 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE
        059A:  return_false
        10@ = 0
    END
END
0AB2: ret 1 10@

0.3.7 - R3
PHP:
:SAMPGetCarNumberPlateByVehicleID

{
    0.3.7 - R3
    0AB1: @SAMPGetCarNumberPlateByVehicleID 1 VehicleID 1249 _Returned: NumberPlate 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x1134
    005A: 10@ += 0@
    0A8D: 10@ = readMem 10@ sz 4 vp 0
    10@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
    0A8D: 4@ = readMem 10@ sz 1 vp 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE
        059A:  return_false
        10@ = 0
    END
END
0AB2: ret 1 10@

0.3.DL
PHP:
:SAMPGetCarNumberPlateByVehicleID

{
    0.3.DL
    0AB1: @SAMPGetCarNumberPlateByVehicleID 1 VehicleID 1249 _Returned: NumberPlate 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x1134
    005A: 10@ += 0@
    0A8D: 10@ = readMem 10@ sz 4 vp 0
    10@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
    0A8D: 4@ = readMem 10@ sz 1 vp 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE
        059A:  return_false
        10@ = 0
    END
END
0AB2: ret 1 10@

:SAMPSetCurrentVehicleNumberPlate
{
    0.3.DL
    0AB1: @SAMPSetCurrentVehicleNumberPlate 1 Text 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    31@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    31@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 31@ readMem 31@ sz 4 vp 0
    0085: 29@ = 31@ // COPY MEMORY
    29@ -= 0x14 // SAMP_CURRENT_VEHICLE_ID_OFFSET
    0A8D: 29@ readMem 29@ sz 4 vp 0
    IF AND
    NOT 29@ == 65535
    29@ >= 0
    00DF:   actor $PLAYER_ACTOR in_car
    THEN
        29@ *= 0x4 // VEHICLE_ID * 0x4
        29@ += 0x1134
        005A: 31@ += 29@
        0A8D: 31@ = readMem 31@ sz 4 vp 0
        31@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
        0AA7: call_function 0x718660 num_params 2 pop 2 source 0@ destination 31@ _Returned: value 17@ // Gta Strcpy
    END
END
0AB2: ret 0

0.3.7 - R4
PHP:
:SAMPGetCarNumberPlateByVehicleID

{
    0.3.7 - R4
    0AB1: @SAMPGetCarNumberPlateByVehicleID 1 VehicleID 1249 _Returned: NumberPlate 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN
    10@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    10@ += 0xC // SAMP_PPOOL_VEHICLE_OFFSET
    0A8D: 10@ readMem 10@ sz 4 vp 0
    0@ *= 0x4 // VEHICLE_ID * 0x14
    0@ += 0x1134
    005A: 10@ += 0@
    0A8D: 10@ = readMem 10@ sz 4 vp 0
    10@ += 0x93 // SAMP_VEHICLE_NUMBER_PLATE_OFFSET
    0A8D: 4@ = readMem 10@ sz 1 vp 0
    IF 4@ > 0
    THEN 0485:  return_true
    ELSE
        059A:  return_false
        10@ = 0
    END
END
0AB2: ret 1 10@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
~ Samp Player ~

0.3.7 R1
PHP:
:SAMPGetTargetPlayerID
{
    0.3.7 - R1
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll" //samp base offset
THEN  
    1@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3CD // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x161 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

0.3.7 R2
PHP:
:SAMPGetTargetPlayerID
{
    0.3.7 - R2
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3C5 // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x185 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

0.3.7 R3
PHP:
:SAMPGetTargetPlayerID
{
    0.3.7 - R3
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x185 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

0.3.DL
PHP:
:SAMPGetTargetPlayerID
{
    0.3.DL
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x189 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

0.3.7 R4 - v1
PHP:
:SAMPGetTargetPlayerID
{
    0.3.7  R4 - v1
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x185 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@

0.3.7 R4 - v2
PHP:
:SAMPGetTargetPlayerID
{
    0.3.7  R4 - v2
    0AB1: @SAMPGetTargetPlayerID 0 _Returned: PlayerID 0@
}
IF 0AA2: 1@ = "samp.dll"
THEN  
    1@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x4 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x26 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x185 // SAMP_TARGET_PLAYER_ID_OFFSET
    0A8D: 1@ readMem 1@ sz 2 vp 0
    IF AND
    NOT 1@ == 65535 // NOT TARGET
    NOT 1@ < 0 // CHECK FOR NEGATIVE ID
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 1 1@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
~ Samp Player ~

0.3.7 - R1
PHP:
:SAMPIsLocalPlayerSpawned
{
    0.3.7 - R1
    0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 1@ = "samp.dll"
THEN    
    1@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3CD // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x18 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x22 // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x136 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
    0A8D: 2@ readMem 1@ sz 4 vp 0
    IF 2@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

0.3.7 - R2
PHP:
:SAMPIsLocalPlayerSpawned
{
    0.3.7 - R2
    0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 1@ = "samp.dll"
THEN    
    1@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3C5 // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x171 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
    0A8D: 2@ readMem 1@ sz 4 vp 0
    IF 2@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

0.3.7 - R3
PHP:
:SAMPIsLocalPlayerSpawned
{
    0.3.7 - R3
    0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 1@ = "samp.dll"
THEN    
    1@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2F3A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x143 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
    0A8D: 2@ readMem 1@ sz 4 vp 0
    IF 2@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

0.3.DL
PHP:
:SAMPIsLocalPlayerSpawned
{
    0.3.DL
    0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 1@ = "samp.dll"
THEN    
    1@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x1E // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x143 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
    0A8D: 2@ readMem 1@ sz 4 vp 0
    IF 2@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0

0.3.7 - R4
PHP:
:SAMPIsLocalPlayerSpawned
{
    0.3.7 - R4
    0AB1: @SAMPIsLocalPlayerSpawned 0
}
IF 0AA2: 1@ = "samp.dll"
THEN    
    1@ += 0x26EA0C // SAMP_INFO_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_POOLS_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_POOL_PLAYER_OFFSET
    0A8D: 1@ = readmem 1@ sz 4 vp 0
    1@ += 0x2A // SAMP_LOCAL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x143 // SAMP_LOCAL_PLAYER_SPAWNED_OFFSET
    0A8D: 2@ readMem 1@ sz 4 vp 0
    IF 2@ > 0
    THEN 0485:  return_true
    ELSE 059A:  return_false
    END
END
0AB2: ret 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
~ Samp Player ~

0.3.7 - R1
PHP:
:SAMPIsPlayerDefined
{
    0.3.7 - R1
    0AB1: @SAMPIsPlayerDefined 1 PlayerID 995
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3CD // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // PLAYER_ID * 4
0@ += 0xFDE
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R2
PHP:
:SAMPIsPlayerDefined
{
    0.3.7 - R2
    0AB1: @SAMPIsPlayerDefined 1 PlayerID 995
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x21A100 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // PLAYER_ID * 4
0@ += 0xFDE
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R3
PHP:
:SAMPIsPlayerDefined
{
    0.3.7 - R3
    0AB1: @SAMPIsPlayerDefined 1 PlayerID 995
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // PLAYER_ID * 4
0@ += 0xFE0
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

0.3.DL
PHP:
:SAMPIsPlayerDefined
{
    0.3.DL
    0AB1: @SAMPIsPlayerDefined 1 PlayerID 995
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // PLAYER_ID * 4
0@ += 0xFDE
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0

0.3.7 - R4
PHP:
:SAMPIsPlayerDefined
{
    0.3.7 - R4
    0AB1: @SAMPIsPlayerDefined 1 PlayerID 995
}
0AA2: 1@ = load_library "samp.dll"
1@ += 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x3DE // SAMP_PPOOLS_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
0A8D: 1@ readMem 1@ sz 4 vp 0
0@ *= 0x4 // PLAYER_ID * 4
0@ += 0xFDE
005A: 1@ += 0@
0A8D: 2@ readMem 1@ sz 4 vp 0
IF 2@ == TRUE
THEN 0485:  return_true
ELSE 059A:  return_false
END
0AB2: 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0B20: samp 2@ = actor_handle_by_samp_player_id 1@
Without SAMPFUNCS

~ Samp Player ~


0.3.7 - R1
PHP:
:SAMPGetActorHandleByID
{
    0.3.7 - R1
    0AB1: @SAMPGetActorHandleByID 1 PlayerID 995 _Returned: Handle 1@
}
IF 0AA2: 1@ = "samp.dll"
THEN 
    1@ += 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x3CD // SAMP_PPOOLS_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x18 // SAMP_PPOOL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0@ *= 0x4 // PLAYER_ID * 4
    0@ += 0x2E // SAMP_REMOTEPLAYER_OFFSET
    005A: 1@ += 0@
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF 1@ > 0
    THEN
        1@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
        0A8D: 1@ readMem 1@ sz 4 vp 0
        IF 1@ > 0
        THEN
            1@ += 0x0 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
            0A8D: 1@ readMem 1@ sz 4 vp 0
            IF 1@ > 0
            THEN
                1@ += 0x44 // SAMP_REMOTEPLAYERDATA_HANDLE_OFFSET 
                0A8D: 1@ readMem 1@ sz 4 vp 0
                IF NOT 1@ < 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        ELSE 059A:  return_false
        END
    ELSE 059A:  return_false
    END
END
0AB2: 1 1@

0.3.7 - R2
PHP:
:SAMPGetActorHandleByID
{
    0.3.7 - R2
    0AB1: @SAMPGetActorHandleByID 1 PlayerID 995 _Returned: Handle 1@
}
IF 0AA2: 1@ = "samp.dll"
THEN 
    1@ += 0x21A100 // SAMP_INFO_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x3C5 // SAMP_PPOOLS_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0@ *= 0x4 // PLAYER_ID * 4
    0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
    005A: 1@ += 0@
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF 1@ > 0
    THEN
        1@ += 0xC // SAMP_REMOTEPLAYERDATA_OFFSET
        0A8D: 1@ readMem 1@ sz 4 vp 0
        IF 1@ > 0
        THEN
            1@ += 0x1C // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
            0A8D: 1@ readMem 1@ sz 4 vp 0
            IF 1@ > 0
            THEN
                1@ += 0x44 // SAMP_REMOTEPLAYERDATA_HANDLE_OFFSET 
                0A8D: 1@ readMem 1@ sz 4 vp 0
                IF NOT 1@ < 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        ELSE 059A:  return_false
        END
    ELSE 059A:  return_false
    END
END
0AB2: 1 1@

0.3.7 - R3
PHP:
:SAMPGetActorHandleByID
{
    0.3.7 - R3
    0AB1: @SAMPGetActorHandleByID 1 PlayerID 995 _Returned: Handle 1@
}
IF 0AA2: 1@ = "samp.dll"
THEN 
    1@ += 0x26E8DC // SAMP_INFO_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0@ *= 0x4 // PLAYER_ID * 4
    0@ += 0x4 // SAMP_REMOTEPLAYER_OFFSET
    005A: 1@ += 0@
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF 1@ > 0
    THEN
        1@ += 0x0 // SAMP_REMOTEPLAYERDATA_OFFSET
        0A8D: 1@ readMem 1@ sz 4 vp 0
        IF 1@ > 0
        THEN
            1@ += 0x0 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
            0A8D: 1@ readMem 1@ sz 4 vp 0
            IF 1@ > 0
            THEN
                1@ += 0x44 // SAMP_REMOTEPLAYERDATA_HANDLE_OFFSET 
                0A8D: 1@ readMem 1@ sz 4 vp 0
                IF NOT 1@ < 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        ELSE 059A:  return_false
        END
    ELSE 059A:  return_false
    END
END
0AB2: 1 1@

0.3.DL
PHP:
:SAMPGetActorHandleByID
{
    0.3.DL
    0AB1: @SAMPGetActorHandleByID 1 PlayerID 995 _Returned: Handle 1@
}
IF 0AA2: 1@ = "samp.dll"
THEN 
    1@ += 0x2ACA24 // SAMP_INFO_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x3DE // SAMP_PPOOLS_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    1@ += 0x8 // SAMP_PPOOL_PLAYER_OFFSET
    0A8D: 1@ readMem 1@ sz 4 vp 0
    0@ *= 0x4 // PLAYER_ID * 4
    0@ += 0x26 // SAMP_REMOTEPLAYER_OFFSET
    005A: 1@ += 0@
    0A8D: 1@ readMem 1@ sz 4 vp 0
    IF 1@ > 0
    THEN
        1@ += 0x8 // SAMP_REMOTEPLAYERDATA_OFFSET
        0A8D: 1@ readMem 1@ sz 4 vp 0
        IF 1@ > 0
        THEN
            1@ += 0x4 // SAMP_REMOTEPLAYERDATA_ACTOR_OFFSET
            0A8D: 1@ readMem 1@ sz 4 vp 0
            IF 1@ > 0
            THEN
                1@ += 0x44 // SAMP_REMOTEPLAYERDATA_HANDLE_OFFSET 
                0A8D: 1@ readMem 1@ sz 4 vp 0
                IF NOT 1@ < 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        ELSE 059A:  return_false
        END
    ELSE 059A:  return_false
    END
END
0AB2: 1 1@

0.3.7 - R4
PHP:
Maybe soon..
Who know's when i find offsets..
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetCursorPosOfFullScreenXY
// 0AB1: @GetCursorPosOfFullScreenXY 0 _Returned: 31@ 30@
IF 0AA2: 31@ = load_library "user32.dll"
THEN
    0AA4: 30@ = get_proc_address "GetCursorPos" library 31@
    0AC7: 28@ = var 29@ offset
    0AA5: call 30@ num_params 1 pop 0 28@
    0A8D: 27@ = read_memory 28@ size 4 virtual_protect 0
    28@ += 4
    0A8D: 26@ = read_memory 28@ size 4 virtual_protect 0
    
    2@ = 640.0 // screen X
    0A8D: 4@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X
    0093: 4@ = integer 4@ to_float
    0073: 2@ /= 4@
    006B: 27@ *= 2@
    3@ = 448.0 // screen Y
    0A8D: 5@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y
    0093: 5@ = integer 5@ to_float
    0073: 3@ /= 5@
    006B: 26@ *= 3@
    0093: 27@ = integer 27@ to_float
    0093: 26@ = integer 26@ to_float
END
0AB2: ret 2 27@ 26@
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Opcode:
0B75: samp get_chat_string 1@ text_to 2@ prefix_to 3@ color_to 4@ prefix_color_to 5@
0AF8: samp add_message_to_chat 1@ color 2@
0B4C: samp is_dialog_active 1@
0B50: samp 2@ = object_handle_by_id 1@
0B77: samp get_chat_input_text_to 1@
Without SAMPFUNCS


~ Multi Samp Snippet ~

PHP:
:getChatString
{
    0AC8: 1@ = allocate_memory_size 1024
    0AC8: 2@ = allocate_memory_size 1024
    0AB1: @getChatString 2 SampVersionID 0@ ChatID 99 _Returned: Text 1@ PrefixText 2@ Color 3@ PrefixColor 4@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN 
            31@ += 0x21A0E4 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
        IF 0@ == 2 // 0.3.7 R2
        THEN 
            31@ += 0x21A0EC // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END

        IF 0@ == 3 // 0.3.DL
        THEN 
            31@ += 0x2ACA10 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END

        IF 0@ == 4 // 0.3.7 R3
        THEN  
            31@ += 0x26E8C8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END

        IF 0@ == 5 // 0.3.7 R4
        THEN 
            31@ += 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
      
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN 
            31@ += 0x26E9F8 // SAMP_CHAT_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x132
            1@ *= 0xFC
            005A: 31@ += 1@
            0A8E: 30@ = 31@ + 0x20 // CHAT_TEXT_OFFSET
            0A8E: 29@ = 31@ + 0x4 // CHAT_PREFIX_TEXT_OFFSET
            0A8E: 28@ = 31@ + 0xF4 // CHAT_COLOR_OFFSET
            0A8D: 27@ readMem 28@ sz 4 vp 0 // HEX Color
            0A8E: 26@ = 31@ + 0xF8 // CHAT_PREFIX_COLOR_OFFSET
            0A8D: 25@ readMem 26@ sz 1 vp 0
            IF NOT 25@ > 0
            THEN 24@ = 0
            ELSE 0A8D: 24@ readMem 26@ sz 4 vp 0
            END
        END
    END
    0AA3: 31@
END
0AB2: ret 4 30@ 29@ 27@ 24@

PHP:
:Chatmsg
/*
     0AC8: 4@ = allocate_memory_size 1024
     0AD3: 4@ = format "{FFFFFF}Auto Accept: {00FF00}ON"
     0AB1: @Chatmsg 3 SampVersionID 0@ text 4@ color 0xFF00FF00
*/
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x21A0E4            // SAMP_CHAT_INFO_OFFSET (R1)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x64010             // FUNC_ADDTOCHATWND (R1)
        END

        IF 0@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0EC            // SAMP_CHAT_INFO_OFFSET (R2)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x640E0            // FUNC_ADDTOCHATWND (R2)
        END

        IF 0@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2ACA10            // SAMP_CHAT_INFO_OFFSET (DL)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67650             // FUNC_ADDTOCHATWND (DL)
        END

        IF 0@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E8C8            // SAMP_CHAT_INFO_OFFSET (R3)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67460             // FUNC_ADDTOCHATWND (R3)
        END

        IF 0@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8            // SAMP_CHAT_INFO_OFFSET (R4)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67BA0             // FUNC_ADDTOCHATWND (R4) 699D0
        END
      
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN
            0A8E: 30@ = 31@ + 0x26E9F8            // SAMP_CHAT_INFO_OFFSET (R4)
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChat;
            0A8E: 29@ = 31@ + 0x67BE0            // FUNC_ADDTOCHATWND (R4)
        END
        IF 2@ == -1
        THEN 2@ = 0xFFFFFFFF
        END
        0AA6: call 29@ struct 30@ num_params 5 pop 0 params 0 2@ 0 1@ 8
    END
END
0AB2: 0

PHP:
:isDialogOpen
// 0AB1: @isDialogOpen 1 SampVersionID 1
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN
            0A8E: 30@ = 31@ + 0x21A0B8
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 30@ = 30@ + 0x28
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 0@ == 2 // 0.3.7 R2
        THEN
            0A8E: 30@ = 31@ + 0x21A0C0
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 30@ = 30@ + 0x28
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END

        IF 0@ == 3 // 0.3.DL
        THEN
            0A8E: 30@ = 31@ + 0x2AC9E0
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 30@ = 30@ + 0x28
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END

        IF 0@ == 4 // 0.3.7 R3
        THEN
            0A8E: 30@ = 31@ + 0x26E898
            0A8D: 30@ = readMem 2@ sz 4 vp 0
            0A8E: 30@ = 30@ + 0x28
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END

        IF 0@ == 5 // 0.3.7 R4
        THEN
            0A8E: 30@ = 31@ + 0x26E9C8
            0A8D: 30@ = readMem 30@ sz 4 vp 0
            0A8E: 30@ = 30@ + 0x28
            0A8D: 30@ = readMem 30@ sz 4 vp 0
        END
        IF 30@ == TRUE
        THEN 0485: dialog_open
        ELSE 059A: dialog_closed
        END
    END
    0AA3: 31@
END
0AB2: ret 0

PHP:
:SAMPGetObjectHandleByID
{
    0AB1: @SAMPGetObjectHandleByID 2 SampVersionID 1 ObjectID 1249 _Returned: Handle 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN
            31@ += 0x21A0F8 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3CD // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x4 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            1@ *= 0x4 // OBJECT_ID * 0x4
            1@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 1@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
            IF 30@ > 0
            THEN
                30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
                0A8D: 30@ = readMem 30@ sz 4 vp 0
                IF 30@ > 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        END

        IF 0@ == 2 // 0.3.7 R2
        THEN
            31@ += 0x21A100 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3C5 // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            1@ *= 0x4 // OBJECT_ID * 0x4
            1@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 1@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
            IF 30@ > 0
            THEN
                30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
                0A8D: 30@ = readMem 30@ sz 4 vp 0
                IF 30@ > 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        END

        IF 0@ == 3 // 0.3.DL
        THEN
            31@ += 0x2ACA24 // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            1@ *= 0x4 // OBJECT_ID * 0x4
            1@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 1@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
            IF 30@ > 0
            THEN
                30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
                0A8D: 30@ = readMem 30@ sz 4 vp 0
                IF 30@ > 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        END

        IF 0@ == 4 // 0.3.7 R3
        THEN
            31@ += 0x26E8DC // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            1@ *= 0x4 // OBJECT_ID * 0x4
            1@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 1@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
            IF 30@ > 0
            THEN
                30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
                0A8D: 30@ = readMem 30@ sz 4 vp 0
                IF 30@ > 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        END

        IF 0@ == 5 // 0.3.7 R4
        THEN
            31@ += 0x26EA0C // SAMP_INFO_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x3DE // SAMP_PPOOLS_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            31@ += 0x14 // SAMP_PPOOL_OBJECT_OFFSET
            0A8D: 31@ readMem 31@ sz 4 vp 0
            1@ *= 0x4 // OBJECT_ID * 0x4
            1@ += 0xFA4  // SAMP_OBJECT_PPOOL_STRUCT_OFFSET
            005A: 31@ += 1@
            0A8D: 30@ = readMem 31@ sz 4 vp 0
            IF 30@ > 0
            THEN
                30@ += 0x44 // SAMP_OBJECT_HANDLE_OFFSET
                0A8D: 30@ = readMem 30@ sz 4 vp 0
                IF 30@ > 0
                THEN 0485:  return_true
                ELSE 059A:  return_false
                END
            ELSE 059A:  return_false
            END
        END
    END
END
0AB2: 0

PHP:
:GetChatInputEditBoxText
{
    0AB1: @GetChatInputEditBoxText 1 SampVersionID 29@ _Returned: Text 0@
}
IF 0AA2: 31@ = "samp.dll"
THEN
    IF NOT 0@ < 1
    THEN
        IF 0@ == 1 // 0.3.7 R1
        THEN     
            0A8E: 30@ = 31@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x81030 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
        IF 0@ == 2 // 0.3.7 R2
        THEN     
            0A8E: 30@ = 31@ + 0x21A0F0            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x810D0 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
       
        IF 0@ == 3 // 0.3.DL
        THEN     
            0A8E: 30@ = 31@ + 0x2ACA14            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x850D0 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
       
        IF 0@ == 4 // 0.3.7 R3
        THEN     
            0A8E: 30@ = 31@ + 0x26E8CC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x84F40 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
       
        IF 0@ == 5 // 0.3.7 R4
        THEN     
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x85680 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
       
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN     
            0A8E: 30@ = 31@ + 0x26E9FC            // SAMP_CHAT_INPUT_INFO_OFFSET
            0A8D: 30@ = readMem 30@ sz 4 vp 0     // pChatInput;
            0A8E: 29@ = 30@ + 0x8                // pChatInput->pEditBox;
            0A8D: 29@ = readMem 29@ sz 4 vp 0     // pEditBox;
          
            0A8E: 28@ = 31@ + 0x856B0 // CDXUTEditBox::GetText
            0AA8: call_function_method 28@ struct 29@ num_params 0 pop 0  _Returned: Text 27@
        END
    END
END
0AB2: 1 27@

PHP:
:MuteServerChat
{
    NOPs
    0AB1: @MuteServerChat 2 SampVersionID 0@ State TRUE
}
IF 0AA2: 31@ = "samp.dll"
THEN  
    IF NOT 0@ < 1 
    THEN 
        IF 0@ == 1 // 0.3.7 R1
        THEN      
            31@ += 0xC050
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END
        END
        IF 0@ == 2 // 0.3.7 R2
        THEN      
            31@ += 0xC050
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END     
        END
        
        IF 0@ == 3 // 0.3.DL
        THEN      
            31@ += 0xEE60
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END     
        END
        
        IF 0@ == 4 // 0.3.7 R3
        THEN      
            31@ += 0xEC50
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END       
        END
        
        IF 0@ == 5 // 0.3.7 R4
        THEN      
            31@ += 0xEF60
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END        
        END
        
        IF 0@ == 6 // 0.3.7 R4 - v2
        THEN      
            31@ += 0xEF90
            0A8D: 30@ = readMem 31@ sz 1 vp 1
            IF 1@ == TRUE
            THEN 0A8C: writeMem 31@ sz 1 vl 0xC3 vp 1
            ELSE 0A8C: writeMem 31@ sz 1 vl 0x55 vp 1
            END        
        END
    END
END
0AB2: ret 0
 
Last edited:
Status
Not open for further replies.
Top