Jump to content

طلب تعديل


Recommended Posts

#Client Side

addEventHandler("onClientGUIClick",root, 
function ( ) 
if ( source == tkbtn ) then 
if ( guiGridListGetSelectedItem(pList ) ~= -1 ) then 
local plr = guiGridListGetItemText(pList ,guiGridListGetSelectedItem(pList ),1) 
local myPlayer = getPlayerFromName ( plr ) 
triggerServerEvent ("takecar", resourceRoot, plr) 
end 
end 
end 
) 

#Server Side

addEvent ("takecar", true) 
addEventHandler ("takecar", root, 
function (plr) 
    toggleControl ( plr, "enter_exit", false ) 
    outputChatBox ( "# Your License Has Been Removed", plr, 255, 0, 0, true ) 
end 
    ) 

Link to comment
  
addEventHandler("onClientGUIClick",root, 
function ( ) 
local sel = guiGridListGetSelectedItem( pList ) 
if  source == tkbtn  and sel ~= -1 then 
local plr = guiGridListGetItemText(pList ,sel,1) 
local myPlayer = getPlayerFromName ( plr ) 
triggerServerEvent ("takecar", localPlayer, myPlayer) 
end 
end 
end 
) 
  

  
addEvent ("takecar", true) 
addEventHandler ("takecar", root, 
function ( myPlayer ) 
    toggleControl ( myPlayer, "enter_exit", false ) 
    outputChatBox ( "# Your License Has Been Removed", myPlayer, 255, 0, 0, true ) 
end 
    ) 
  

جرب

Edit *

Edited by Guest
Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        wnd = guiCreateWindow(458, 273, 447, 499, "Police Manager Panel | لوحة رئيس الشرطة", false) 
        guiWindowSetSizable(wnd, false) 
        guiWindowSetMovable(wnd, false) 
        guiSetAlpha(wnd, 1.00) 
  
        pList = guiCreateGridList(17, 25, 202, 452, false, wnd) 
        guiGridListAddColumn(pList, "# Players List", 0.9) 
        slapbtn = guiCreateButton(226, 30, 193, 36, "~# Slap #~", false, wnd) 
        guiSetProperty(slapbtn, "NormalTextColour", "FFFF1D1D") 
        desbtn = guiCreateButton(226, 76, 193, 36, "~# Destroy Car #~", false, wnd) 
        guiSetProperty(desbtn, "NormalTextColour", "FFFF1D1D") 
        gvbtn = guiCreateButton(226, 118, 193, 36, "~# Give License #~", false, wnd) 
        guiSetProperty(gvbtn, "NormalTextColour", "FF1BFF03") 
        tkbtn = guiCreateButton(226, 164, 193, 36, "~# Take License #~", false, wnd) 
        guiSetProperty(tkbtn, "NormalTextColour", "FFFF0202") 
        jailOpen = guiCreateButton(226, 215, 193, 36, "~# Jail Player #~", false, wnd) 
        guiSetProperty(jailOpen, "NormalTextColour", "FFFF0202") 
        unbtn = guiCreateButton(226, 266, 193, 36, "~# UnJail Player #~", false, wnd) 
        guiSetProperty(unbtn, "NormalTextColour", "FF1BFF03") 
        enbtn = guiCreateButton(226, 316, 193, 36, "~# English #~", false, wnd) 
        guiSetProperty(enbtn, "NormalTextColour", "FF02B4FF") 
        arbtn = guiCreateButton(226, 367, 193, 36, "~# Arabic #~", false, wnd) 
        guiSetProperty(arbtn, "NormalTextColour", "FF02B4FF") 
        Close = guiCreateButton(226, 413, 193, 36, "~# Close #~", false, wnd) 
        guiSetProperty(Close, "NormalTextColour", "FFFFAE01") 
        VersionLabel = guiCreateLabel(226, 457, 193, 15, "# Police Manager Panal | V1.5.2", false, wnd) 
        guiLabelSetColor(VersionLabel, 255, 82, 29) 
        label2 = guiCreateLabel(227, 474, 193, 15, "# Created By | Sha[D]ow & mIDO", false, wnd) 
        guiLabelSetColor(label2, 45, 255, 29) 
        guiSetVisible(wnd,false)         
    end 
) 
  
-------------------------------------------------------------- 
  
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
local screenW, screenH = guiGetScreenSize() 
        jailWnd = guiCreateWindow((screenW - 337) / 2, (screenH - 238) / 2, 337, 238, "# Jail Information", false) 
        guiWindowSetMovable(jailWnd, false) 
        guiWindowSetSizable(jailWnd, false) 
        guiSetAlpha(jailWnd, 1.00) 
  
        tList = guiCreateGridList(23, 24, 140, 151, false, jailWnd) 
        guiGridListAddColumn(tList, "# Time", 0.9) 
        jList = guiCreateGridList(175, 24, 138, 152, false, jailWnd) 
        guiGridListAddColumn(jList, "# Places", 0.9) 
        jailButton = guiCreateButton(23, 186, 138, 32, "Jail Player", false, jailWnd) 
        guiSetProperty(jailButton, "NormalTextColour", "FFAAAAAA") 
        JailClose = guiCreateButton(175, 186, 138, 32, "Close", false, jailWnd) 
        guiSetProperty(JailClose, "NormalTextColour", "FFAAAAAA")  
        guiSetVisible(jailWnd,false)         
    end 
) 
  
  
-------------------------------------------------------------- 
bindKey ("m","down", 
function () 
triggerServerEvent ("check",localPlayer) 
end) 
addEvent ("openWND",true) 
addEventHandler ("openWND",root, 
function () 
guiSetVisible(wnd,not guiGetVisible(wnd)) 
showCursor(guiGetVisible(wnd)) 
guiSetInputEnabled (guiGetVisible(wnd)) 
end 
) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == jailOpen ) then 
guiSetVisible(wnd,false) 
guiSetVisible(jailWnd,true) 
end 
end 
 ) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == JailClose ) then 
guiSetVisible(jailWnd,false) 
guiSetInputEnabled (false) 
showCursor(false) 
end 
end 
 ) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == Close ) then 
guiSetVisible(wnd,false) 
guiSetInputEnabled (false) 
showCursor(false) 
end 
end 
 ) 
-------------------------------------------------------------- 
function update () 
guiGridListClear(pList) 
for i,v in ipairs (getElementsByType("player")) do 
local rp = guiGridListAddRow (pList) 
guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
end 
end 
addEventHandler ("onClientResourceStart",resourceRoot,update) 
addEventHandler ("onClientPlayerJoin",root,update) 
addEventHandler ("onClientPlayerChangeNick",root,update) 
addEventHandler ("onClientPlayerQuit",root,update) 
-------------------------------------------------------------- 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",root, 
function ( ) 
local sel = guiGridListGetSelectedItem( pList ) 
if  source == tkbtn  and sel ~= -1 then 
local plr = guiGridListGetItemText(pList ,sel,1) 
local myPlayer = getPlayerFromName ( plr ) 
triggerServerEvent ("takecar", localPlayer, myPlayer) 
end 
end 
end 
) 

Link to comment

يخي سعود تعب تعب مو طبيعي يششرحلكم يخي لازم تحذف هذا

  
addEventHandler("onClientResourceStart", resourceRoot, 
  

ولا مابيشتغل لانه هو داخل حدث

الكود

  
       local screenW, screenH = guiGetScreenSize() 
  
        wnd = guiCreateWindow(458, 273, 447, 499, "Police Manager Panel | لوحة رئيس الشرطة", false) 
        guiWindowSetSizable(wnd, false) 
        guiWindowSetMovable(wnd, false) 
        guiSetAlpha(wnd, 1.00) 
  
        pList = guiCreateGridList(17, 25, 202, 452, false, wnd) 
        guiGridListAddColumn(pList, "# Players List", 0.9) 
        slapbtn = guiCreateButton(226, 30, 193, 36, "~# Slap #~", false, wnd) 
        guiSetProperty(slapbtn, "NormalTextColour", "FFFF1D1D") 
        desbtn = guiCreateButton(226, 76, 193, 36, "~# Destroy Car #~", false, wnd) 
        guiSetProperty(desbtn, "NormalTextColour", "FFFF1D1D") 
        gvbtn = guiCreateButton(226, 118, 193, 36, "~# Give License #~", false, wnd) 
        guiSetProperty(gvbtn, "NormalTextColour", "FF1BFF03") 
        tkbtn = guiCreateButton(226, 164, 193, 36, "~# Take License #~", false, wnd) 
        guiSetProperty(tkbtn, "NormalTextColour", "FFFF0202") 
        jailOpen = guiCreateButton(226, 215, 193, 36, "~# Jail Player #~", false, wnd) 
        guiSetProperty(jailOpen, "NormalTextColour", "FFFF0202") 
        unbtn = guiCreateButton(226, 266, 193, 36, "~# UnJail Player #~", false, wnd) 
        guiSetProperty(unbtn, "NormalTextColour", "FF1BFF03") 
        enbtn = guiCreateButton(226, 316, 193, 36, "~# English #~", false, wnd) 
        guiSetProperty(enbtn, "NormalTextColour", "FF02B4FF") 
        arbtn = guiCreateButton(226, 367, 193, 36, "~# Arabic #~", false, wnd) 
        guiSetProperty(arbtn, "NormalTextColour", "FF02B4FF") 
        Close = guiCreateButton(226, 413, 193, 36, "~# Close #~", false, wnd) 
        guiSetProperty(Close, "NormalTextColour", "FFFFAE01") 
        VersionLabel = guiCreateLabel(226, 457, 193, 15, "# Police Manager Panal | V1.5.2", false, wnd) 
        guiLabelSetColor(VersionLabel, 255, 82, 29) 
        label2 = guiCreateLabel(227, 474, 193, 15, "# Created By | Sha[D]ow & mIDO", false, wnd) 
        guiLabelSetColor(label2, 45, 255, 29) 
        guiSetVisible(wnd,false)        
  
  
        jailWnd = guiCreateWindow((screenW - 337) / 2, (screenH - 238) / 2, 337, 238, "# Jail Information", false) 
        guiWindowSetMovable(jailWnd, false) 
        guiWindowSetSizable(jailWnd, false) 
        guiSetAlpha(jailWnd, 1.00) 
  
        tList = guiCreateGridList(23, 24, 140, 151, false, jailWnd) 
        guiGridListAddColumn(tList, "# Time", 0.9) 
        jList = guiCreateGridList(175, 24, 138, 152, false, jailWnd) 
        guiGridListAddColumn(jList, "# Places", 0.9) 
        jailButton = guiCreateButton(23, 186, 138, 32, "Jail Player", false, jailWnd) 
        guiSetProperty(jailButton, "NormalTextColour", "FFAAAAAA") 
        JailClose = guiCreateButton(175, 186, 138, 32, "Close", false, jailWnd) 
        guiSetProperty(JailClose, "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(jailWnd,false)        
  

بدله بدل

من سطر رقم 1

لين سطر58

Link to comment

طيب جرب

  
        wnd = guiCreateWindow(458, 273, 447, 499, "Police Manager Panel | لوحة رئيس الشرطة", false) 
        guiWindowSetSizable(wnd, false) 
        guiWindowSetMovable(wnd, false) 
        guiSetAlpha(wnd, 1.00) 
  
        pList = guiCreateGridList(17, 25, 202, 452, false, wnd) 
        guiGridListAddColumn(pList, "# Players List", 0.9) 
        slapbtn = guiCreateButton(226, 30, 193, 36, "~# Slap #~", false, wnd) 
        guiSetProperty(slapbtn, "NormalTextColour", "FFFF1D1D") 
        desbtn = guiCreateButton(226, 76, 193, 36, "~# Destroy Car #~", false, wnd) 
        guiSetProperty(desbtn, "NormalTextColour", "FFFF1D1D") 
        gvbtn = guiCreateButton(226, 118, 193, 36, "~# Give License #~", false, wnd) 
        guiSetProperty(gvbtn, "NormalTextColour", "FF1BFF03") 
        tkbtn = guiCreateButton(226, 164, 193, 36, "~# Take License #~", false, wnd) 
        guiSetProperty(tkbtn, "NormalTextColour", "FFFF0202") 
        jailOpen = guiCreateButton(226, 215, 193, 36, "~# Jail Player #~", false, wnd) 
        guiSetProperty(jailOpen, "NormalTextColour", "FFFF0202") 
        unbtn = guiCreateButton(226, 266, 193, 36, "~# UnJail Player #~", false, wnd) 
        guiSetProperty(unbtn, "NormalTextColour", "FF1BFF03") 
        enbtn = guiCreateButton(226, 316, 193, 36, "~# English #~", false, wnd) 
        guiSetProperty(enbtn, "NormalTextColour", "FF02B4FF") 
        arbtn = guiCreateButton(226, 367, 193, 36, "~# Arabic #~", false, wnd) 
        guiSetProperty(arbtn, "NormalTextColour", "FF02B4FF") 
        Close = guiCreateButton(226, 413, 193, 36, "~# Close #~", false, wnd) 
        guiSetProperty(Close, "NormalTextColour", "FFFFAE01") 
        VersionLabel = guiCreateLabel(226, 457, 193, 15, "# Police Manager Panal | V1.5.2", false, wnd) 
        guiLabelSetColor(VersionLabel, 255, 82, 29) 
        label2 = guiCreateLabel(227, 474, 193, 15, "# Created By | Sha[D]ow & mIDO", false, wnd) 
        guiLabelSetColor(label2, 45, 255, 29) 
        guiSetVisible(wnd,false)        
  
-------------------------------------------------------------- 
  
local screenW, screenH = guiGetScreenSize() 
        jailWnd = guiCreateWindow((screenW - 337) / 2, (screenH - 238) / 2, 337, 238, "# Jail Information", false) 
        guiWindowSetMovable(jailWnd, false) 
        guiWindowSetSizable(jailWnd, false) 
        guiSetAlpha(jailWnd, 1.00) 
  
        tList = guiCreateGridList(23, 24, 140, 151, false, jailWnd) 
        guiGridListAddColumn(tList, "# Time", 0.9) 
        jList = guiCreateGridList(175, 24, 138, 152, false, jailWnd) 
        guiGridListAddColumn(jList, "# Places", 0.9) 
        jailButton = guiCreateButton(23, 186, 138, 32, "Jail Player", false, jailWnd) 
        guiSetProperty(jailButton, "NormalTextColour", "FFAAAAAA") 
        JailClose = guiCreateButton(175, 186, 138, 32, "Close", false, jailWnd) 
        guiSetProperty(JailClose, "NormalTextColour", "FFAAAAAA") 
        guiSetVisible(jailWnd,false)        
  
-------------------------------------------------------------- 
bindKey ("m","down", 
function () 
triggerServerEvent ("check",localPlayer) 
end) 
addEvent ("openWND",true) 
addEventHandler ("openWND",root, 
function () 
guiSetVisible(wnd,not guiGetVisible(wnd)) 
showCursor(guiGetVisible(wnd)) 
guiSetInputEnabled (guiGetVisible(wnd)) 
end 
) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == jailOpen ) then 
guiSetVisible(wnd,false) 
guiSetVisible(jailWnd,true) 
end 
end 
 ) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == JailClose ) then 
guiSetVisible(jailWnd,false) 
guiSetInputEnabled (false) 
showCursor(false) 
end 
end 
 ) 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",resourceRoot, function ( ) 
if ( source == Close ) then 
guiSetVisible(wnd,false) 
guiSetInputEnabled (false) 
showCursor(false) 
end 
end 
 ) 
-------------------------------------------------------------- 
function update () 
guiGridListClear(pList) 
for i,v in ipairs (getElementsByType("player")) do 
local rp = guiGridListAddRow (pList) 
guiGridListSetItemText (pList,rp,1,getPlayerName(v),false,false) 
end 
end 
addEventHandler ("onClientResourceStart",resourceRoot,update) 
addEventHandler ("onClientPlayerJoin",root,update) 
addEventHandler ("onClientPlayerChangeNick",root,update) 
addEventHandler ("onClientPlayerQuit",root,update) 
-------------------------------------------------------------- 
-------------------------------------------------------------- 
addEventHandler("onClientGUIClick",tkbtn,function ( ) 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
triggerServerEvent ("takecar", localPlayer,getPlayerFromName (guiGridListGetItemText(pList ,sel,1))) 
end 
end,false) 
  

^^

Edit

Edited by Guest
Link to comment
  
addEventHandler("onClientGUIClick",root, 
function ( ) 
local sel = guiGridListGetSelectedItem( pList ) 
if  source == tkbtn  and sel ~= -1 then 
local plr = guiGridListGetItemText(pList ,sel,1) 
local myPlayer = getPlayerFromName ( plr ) 
triggerServerEvent ("takecar", localPlayer, myPlayer) 
end 
end 
end 
) 
  

جرب

Edit *

فى اند زايده

+ جرب

addEventHandler("onClientGUIClick",tkbtn,function ( ) 
sel = guiGridListGetSelectedItem( pList ) 
if sel ~= -1 then 
triggerServerEvent ("takecar", localPlayer,getPlayerFromName (guiGridListGetItemText(pList ,sel,1))) 
end 
end,false)  
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...