Skip to content

Commit 92e0f69

Browse files
committed
Add more keymappins, add a dummy for EditPlayerObject, make dialogs use the relative property.
1 parent c5145d3 commit 92e0f69

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

amx/client/client.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ function createListDialog()
13531353
listWindow = guiCreateWindow(screenWidth/2 - 541/2,screenHeight/2 - 352/2,541,352,"",false)
13541354
guiWindowSetMovable(listWindow,false)
13551355
guiWindowSetSizable(listWindow,false)
1356-
listGrid = guiCreateGridList(9,19,523,300,false,listWindow)
1356+
listGrid = guiCreateGridList(0.0, 0.1, 1.0, 0.8,true,listWindow)
13571357
guiGridListSetSelectionMode(listGrid,2)
13581358
guiGridListSetScrollBars(listGrid, true, true)
13591359
listColumn = guiGridListAddColumn(listGrid, "List", 0.85)
@@ -1369,10 +1369,10 @@ function createInputDialog()
13691369
inputWindow = guiCreateWindow(screenWidth/2 - 541/2,screenHeight/2 - 352/2,541,352,"",false)
13701370
guiWindowSetMovable(listWindow,false)
13711371
guiWindowSetSizable(listWindow,false)
1372-
inputLabel = guiCreateLabel(9, 19, 523, 270, "", false, inputWindow)
1373-
inputEdit = guiCreateEdit(9,290,523,30,"",false,inputWindow)
1374-
inputButton1 = guiCreateButton(10,323,256,20,"",false,inputWindow)
1375-
inputButton2 = guiCreateButton(281,323,256,20,"",false,inputWindow)
1372+
inputLabel = guiCreateLabel(0.1, 0.1, 1.0, 0.8, "", true, inputWindow)
1373+
inputEdit = guiCreateEdit(0.0, 0.7, 1.0, 0.1,"",true,inputWindow)
1374+
inputButton1 = guiCreateButton(0.3, 0.9, 0.15, 0.1,"",true,inputWindow) --x, y, width, height
1375+
inputButton2 = guiCreateButton(0.5, 0.9, 0.15, 0.1,"",true,inputWindow)
13761376
guiSetVisible(inputWindow, false)
13771377
addEventHandler("onClientGUIClick", inputButton1, OnInputDialogButton1Click, false)
13781378
addEventHandler("onClientGUIClick", inputButton2, OnInputDialogButton2Click, false)
@@ -1383,9 +1383,9 @@ function createMessageDialog()
13831383
msgWindow = guiCreateWindow(screenWidth/2 - 541/2,screenHeight/2 - 352/2,541,352,"",false)
13841384
guiWindowSetMovable(msgWindow,false)
13851385
guiWindowSetSizable(msgWindow,false)
1386-
msgLabel = guiCreateLabel(9, 19, 523, 300, "", false, msgWindow)
1387-
msgButton1 = guiCreateButton(10,323,256,20,"",false,msgWindow)
1388-
msgButton2 = guiCreateButton(281,323,256,20,"",false,msgWindow)
1386+
msgLabel = guiCreateLabel(0.0, 0.1, 1.0, 0.7, "", true, msgWindow)
1387+
msgButton1 = guiCreateButton(0.3, 0.9, 0.15, 0.1,"",true,msgWindow) --x, y, width, height
1388+
msgButton2 = guiCreateButton(0.5, 0.9, 0.15, 0.1,"",true,msgWindow)
13891389
guiSetVisible(msgWindow, false)
13901390
addEventHandler("onClientGUIClick", msgButton1, OnMessageDialogButton1Click, false)
13911391
addEventHandler("onClientGUIClick", msgButton2, OnMessageDialogButton2Click, false)

amx/server/defines.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ local controlMappingMT = {
8282

8383
g_KeyMapping = setmetatable({
8484
[1] = 'action',
85-
[2 ^ 1] = 'crouch',
85+
[2 ^ 1] = {'crouch', 'horn'},
8686
[2 ^ 2] = { 'fire', 'vehicle_fire' },
8787
[2 ^ 3] = 'sprint',
8888
[2 ^ 4] = { 'enter_exit','vehicle_secondary_fire' },

amx/server/syscalls.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,12 @@ function GetPlayerAnimationIndex(player)
312312
return 0
313313
end
314314

315+
function EditPlayerObject(amx, player, object)
316+
--givePlayerMoney(player, amount)
317+
outputDebugString("EditPlayerObject called")
318+
end
319+
320+
315321
function CallLocalFunction(amx, fnName, fmt, ...)
316322
local args = { ... }
317323
for i=1,math.min(#fmt, #args) do
@@ -1380,7 +1386,7 @@ end
13801386

13811387
function SetVehicleVelocity(amx, vehicle, vx, vy, vz)
13821388
setElementVelocity(vehicle, vx, vy, vz)
1383-
setElementAngularVelocity(vehicle, vx, vy, vz)
1389+
--setElementAngularVelocity(vehicle, vx, vy, vz) --This isn't needed, it makes the car spin and I believe samp doesn't do this
13841390
end
13851391

13861392
function SetVehicleVirtualWorld(amx, vehicle, dimension)

0 commit comments

Comments
 (0)