@@ -16,10 +16,10 @@ function aPlayerScreenShot (player)
1616 local x ,y = guiGetScreenSize ()
1717 aScreenShotForm = guiCreateWindow ( x / 2 - 300 , y / 2 - 125 , 600 , 250 , " Screenshot Management" , false )
1818 aScreenShotList = guiCreateGridList ( 0.03 , 0.08 , 0.70 , 0.90 , true , aScreenShotForm )
19- aScreenShotNew = guiCreateButton ( 0.75 , 0.08 , 0.42 , 0.09 , " Take New" , true , aScreenShotForm )
20- aScreenShotDelete = guiCreateButton ( 0.75 , 0.18 , 0.42 , 0.09 , " Delete" , true , aScreenShotForm )
21- aScreenShotView = guiCreateButton ( 0.75 , 0.28 , 0.42 , 0.09 , " View" , true , aScreenShotForm )
22- aScreenShotRefresh = guiCreateButton ( 0.75 , 0.38 , 0.42 , 0.09 , " Refresh" , true , aScreenShotForm )
19+ aScreenShotNew = guiCreateButton ( 0.75 , 0.08 , 0.42 , 0.09 , " Take New" , true , aScreenShotForm , " takescreenshot " )
20+ aScreenShotDelete = guiCreateButton ( 0.75 , 0.18 , 0.42 , 0.09 , " Delete" , true , aScreenShotForm , " deletescreenshot " )
21+ aScreenShotView = guiCreateButton ( 0.75 , 0.28 , 0.42 , 0.09 , " View" , true , aScreenShotForm , " viewscreenshot " )
22+ aScreenShotRefresh = guiCreateButton ( 0.75 , 0.38 , 0.42 , 0.09 , " Refresh" , true , aScreenShotForm , " listscreenshots " )
2323 aScreenShotClose = guiCreateButton ( 0.75 , 0.88 , 0.42 , 0.09 , " Close" , true , aScreenShotForm )
2424 guiGridListAddColumn (aScreenShotList ," Player" ,0.31 )
2525 guiGridListAddColumn (aScreenShotList ," Admin" ,0.31 )
3636function aScreenShotsRefresh ()
3737 if aScreenShotList then
3838 guiGridListClear (aScreenShotList )
39- triggerServerEvent (" aScreenShot" ,resourceRoot ," list" ,localPlayer )
39+ if hasPermissionTo (" command.listscreenshots" ) then
40+ triggerServerEvent (" aScreenShot" ,localPlayer ," list" )
41+ end
4042 end
4143end
4244
@@ -54,7 +56,7 @@ function aScreenShotsDoubleClick (button)
5456 if source == aScreenShotList then
5557 local row = guiGridListGetSelectedItem (aScreenShotList )
5658 if row ~= - 1 then
57- triggerServerEvent (" aScreenShot" ,resourceRoot ," view" , localPlayer ,guiGridListGetItemData (aScreenShotList ,row ,1 ),guiGridListGetItemText (aScreenShotList ,row ,1 ))
59+ triggerServerEvent (" aScreenShot" ,localPlayer ," view" ,guiGridListGetItemData (aScreenShotList ,row ,1 ),guiGridListGetItemText (aScreenShotList ,row ,1 ))
5860 end
5961 end
6062 end
@@ -69,20 +71,20 @@ function aScreenShotsClick (button)
6971 aMessageBox (" error" ," No player selected!" )
7072 else
7173 local name = guiGridListGetItemPlayerName (aTab1 .PlayerList ,guiGridListGetSelectedItem (aTab1 .PlayerList ),1 )
72- triggerServerEvent (" aScreenShot" ,resourceRoot ," new" , localPlayer ,getPlayerFromNick (name ))
74+ triggerServerEvent (" aScreenShot" ,localPlayer ," new" ,getPlayerFromNick (name ))
7375 end
7476 elseif source == aScreenShotDelete then
7577 local row = guiGridListGetSelectedItem ( aScreenShotList )
7678 if row ~= - 1 then
77- triggerServerEvent (" aScreenShot" ,resourceRoot ," delete" , localPlayer ,guiGridListGetItemData (aScreenShotList ,row ,1 ))
79+ triggerServerEvent (" aScreenShot" ,localPlayer ," delete" ,guiGridListGetItemData (aScreenShotList ,row ,1 ))
7880 guiGridListRemoveRow (aScreenShotList ,row )
7981 end
8082 elseif source == aScreenShotRefresh then
8183 aScreenShotsRefresh ()
8284 elseif source == aScreenShotView then
8385 local row = guiGridListGetSelectedItem (aScreenShotList )
8486 if row ~= - 1 then
85- triggerServerEvent (" aScreenShot" ,resourceRoot ," view" , localPlayer ,guiGridListGetItemData (aScreenShotList ,row ,1 ),guiGridListGetItemText (aScreenShotList ,row ,1 ))
87+ triggerServerEvent (" aScreenShot" ,localPlayer ," view" ,guiGridListGetItemData (aScreenShotList ,row ,1 ),guiGridListGetItemText (aScreenShotList ,row ,1 ))
8688 end
8789 else
8890 for player ,gui in pairs (aScreenShotWindows ) do
0 commit comments