-
Notifications
You must be signed in to change notification settings - Fork 1
/
SAMP.dev.jl
47 lines (40 loc) · 2.52 KB
/
SAMP.dev.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module SampApi
export Init, SetParam, GetGTACommandLine, IsMenuOpen, ScreenToWorld, WorldToScreen, GetPlayerCPed
export GetPlayerHealth, GetPlayerArmor, GetPlayerMoney, GetPlayerSkinID, GetPlayerInterior
export IsPlayerInAnyVehicle, IsPlayerDriver, IsPlayerPassenger, IsPlayerInInterior
export GetPlayerX, GetPlayerY, GetPlayerZ, GetPlayerPosition, IsPlayerInRange2D, IsPlayerInRange3D
export GetCityName, GetZoneName, TextCreate, TextDestroy, TextSetShadow, TextSetShown
export TextSetColor, TextSetPos, TextSetString, TextUpdate, BoxCreate, BoxDestroy
export BoxSetShown, BoxSetBorder, BoxSetBorderColor, BoxSetColor, BoxSetHeight, BoxSetPos, BoxSetWidth
export LineCreate, LineDestroy, LineSetShown, LineSetColor, LineSetWidth, LineSetPos
export ImageCreate, ImageDestroy, ImageSetShown, ImageSetAlign, ImageSetPos, ImageSetRotation
export DestroyAllVisual, ShowAllVisual, HideAllVisual, GetFrameRate, GetScreenSpecs
export SetCalculationRatio, SetOverlayPriority, SetOverlayCalculationEnabled, GetServerIP
export GetServerPort, SendChat, ShowGameText, AddChatMessage, ShowDialog, GetPlayerNameByID
export GetPlayerIDByName, GetPlayerName, GetPlayerId, IsChatOpen, IsDialogOpen
export GetVehiclePointer, GetVehicleSpeed, GetVehicleHealth, GetVehicleModelId
export GetVehicleModelName, GetVehicleModelNameById, GetVehicleType, GetVehicleFreeSeats
export GetVehicleFirstColor, GetVehicleSecondColor, GetVehicleColor, IsVehicleSeatUsed
export IsVehicleLocked, IsVehicleHornEnabled, IsVehicleSirenEnabled, IsVehicleAlternateSirenEnabled
export IsVehicleEngineEnabled, IsVehicleLightEnabled, IsVehicleCar, IsVehiclePlane
export IsVehicleBoat, IsVehicleTrain, IsVehicleBike, HasWeaponIDClip, GetPlayerWeaponID
export GetPlayerWeaponType, GetPlayerWeaponSlot, GetPlayerWeaponName, GetPlayerWeaponClip
export GetPlayerWeaponTotalClip, GetPlayerWeaponState, GetPlayerWeaponAmmo, GetPlayerWeaponAmmoInClip
const PATH = "../bin/SAMPDEV.dll"
const SNDMSG = ccall(("SendChat", PATH), Int32, (Cstring,), stdlib="msvcrt")
const ADDCHATMSG = ccall(("AddChatMessage", PATH), Int32, (Cstring,), stdlib="msvcrt")
function SendChatEx(message::String, args...)
if !isempty(message)
if length(args) > 0
message *= " " * join(" ", args)
end
ccall((SNDMSG, PATH), Int32, (Cstring,), message, stdlib="msvcrt")
end
end
function AddChatMessageEx(text::String)
AddChatMessageEx(text, "FFFFFF")
end
function AddChatMessageEx(text::String, color::String)
AddChatMessage("{" * color * "}" * text)
end
end