Jump to content

How To Do it ?


SoMoRay

Recommended Posts

You're welcome.

what the wrong ...

when I write in F8 send

he did't open to me the window

also he did't send the money when I wrote in

edit box this the codes

Client Side !

  
  
triggerServerEvent("Money" , getLocalPlayer(), GUIEditor.edit[1]) 
  
triggerServerEvent("Open" , getLocalPlayer()) 
  

Server Side !

addEvent("Money", true ) 
addEventHandler("Money", root,  
function() 
    givePlayerMoney( root , 9999 ) 
end) 
  
function pp() 
    local accname 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Super.Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Big.Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then  
    addCommandHandler("send",pp) 
end 
end 
addEvent("Open", true ) 
addEventHandler("Open", root, pp) 
Link to comment
addCommandHandler("money", 
function (money) 
local accname = getAccountName(source) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Super.Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Big.Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
    elseif money then   
        money = table.concat({...}, " ") 
        givePlayerMoney(root, money) 
    else 
        outputChatBox("[syntax]: /money [Ammount]", source, 255, 255, 0) 
end 
end 
end 
end    
end 
)    
  

Link to comment
addCommandHandler("money", 
function (money) 
local accname = getAccountName(source) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Super.Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Big.Admin" ) ) then 
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
    elseif money then   
        money = table.concat({...}, " ") 
        givePlayerMoney(root, money) 
    else 
        outputChatBox("[syntax]: /money [Ammount]", source, 255, 255, 0) 
end 
end 
end 
end    
end 
)    
  

WTF? Spam end -_- ?

Link to comment
That doesn't make any sense, post your entire script.

Client Side !

local sx, sy = guiGetScreenSize() 
function centerTheGUI( guiElement ) 
    local width, height = guiGetSize( guiElement, false ) 
    local x, y = sx / 2 - width / 2, sy / 2 - height / 2 
    guiSetPosition( guiElement, x, y, false ) 
end 
  
GUIEditor = { 
    edit = {}, 
} 
wnd = guiCreateWindow(476, 302, 387, 139, "Admin Send Money To All", false) 
centerTheGUI( wnd ) 
guiWindowSetSizable(wnd, false) 
guiSetAlpha(wnd, 1.00) 
guiSetProperty(wnd, "CaptionColour", "C8FFFFFF") 
  
send = guiCreateButton(130, 93, 161, 36, "Send !", false, wnd) 
GUIEditor.edit[1] = guiCreateEdit(69, 42, 280, 36, "", false, wnd) 
Money_Label = guiCreateLabel(16, 52, 45, 23, "Money", false, wnd) 
guiSetFont(Money-Label, "default-bold-small") 
  
triggerServerEvent("Money" , getLocalPlayer(), GUIEditor.edit[1]) 
  
triggerServerEvent("Open" , getLocalPlayer()) 

Server Side !

addEvent("Money", true ) 
addEventHandler("Money", root,  
function() 
    givePlayerMoney( root , 9999 ) 
end) 
  
function pp() 
    local accname =  getAccountName(source) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Super.Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Big.Admin" ) ) then  
    elseif isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then  
    addCommandHandler("send",pp) 
end 
end 
addEvent("Open", true ) 
addEventHandler("Open", root, pp) 
Link to comment

-- Server Side --

addEvent("SendMoney",true); 
addEventHandler("SendMoney",root, 
    function ( Money )  
        for _,v in ipairs ( getElementsByType ("player") ) do 
        if not ( tonumber ( Money )) then return outputChatBox("* Number's Only!",source,255,0,0,true); end 
             givePlayerMoney ( v , tonumber ( Money )) ; 
            outputChatBox("* [ "..getPlayerName(source).." ] | Has Sent  ( "..Money.." $ ) To All Player's ",v,255,255,0,true); 
            end 
        end 
    ); 
     
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
                for i, player in ipairs( getElementsByType( 'player' ) ) do 
            if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Super.Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Big.Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Console" ) ) then 
                setElementData( player, 'Show_GUI', true); 
            else 
                setElementData( player, 'Show_GUI', nil); 
            end 
        end 
end 
); 
  
  
addEventHandler( 'onPlayerLogin', root, function( _, acc ) 
    if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Super.Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Big.Admin" ) ) or isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Console" ) ) then 
       setElementData( source, 'Show_GUI', true); 
   else 
       setElementData( source, 'Show_GUI', nil); 
   end 
end 
); 
addEventHandler( 'onPlayerLogout', root, function( _, acc ) 
   triggerClientEvent( source, 'LogOutSetVisible', root); 
   setElementData( source, 'Show_GUI', nil); 
end 
); 

-- Client Side --

local sx, sy = guiGetScreenSize(); 
function centerTheGUI( guiElement ) 
    local width, height = guiGetSize( guiElement, false ); 
    local x, y = sx / 2 - width / 2, sy / 2 - height / 2 
    guiSetPosition( guiElement, x, y, false ); 
end 
  
GUIEditor = { 
    edit = {}, 
} 
wnd = guiCreateWindow(476, 302, 387, 139, "Admin Send Money To All", false); 
guiSetVisible(wnd,false); 
centerTheGUI( wnd ); 
guiWindowSetSizable(wnd, false); 
guiSetAlpha(wnd, 1.00); 
guiSetProperty(wnd, "CaptionColour", "C8FFFFFF"); 
  
send = guiCreateButton(130, 93, 161, 36, "Send !", false, wnd); 
GUIEditor.edit[1] = guiCreateEdit(69, 42, 280, 36, "", false, wnd); 
Money_Label = guiCreateLabel(16, 52, 45, 23, "Money", false, wnd); 
guiSetFont(Money_Label, "default-bold-small"); 
  
  
addEventHandler("onClientGUIClick",send, 
    function ( ) 
local Money = guiGetText(GUIEditor.edit[1]); 
    triggerServerEvent("SendMoney",localPlayer,Money); 
    end,false); 
  
addCommandHandler("send", 
    function() 
        if getElementData( localPlayer, 'Show_GUI') ~= nil then  
            guiSetVisible(wnd, not guiGetVisible(wnd)); 
            showCursor(guiGetVisible(wnd)); 
            outputChatBox(" * Welcome To Send Money GUI To All Player's",0,255,0,true); 
            else  
            outputChatBox("* You do not have right permissions",255,0,0,true); 
        end 
    end  
); 
  
addEvent( 'LogOutSetVisible', true ); 
addEventHandler( 'LogOutSetVisible', root, 
function() 
    if guiGetVisible(wnd) then 
        guiSetVisible( wnd, false ); 
        showCursor( false ); 
        outputChatBox("* You do not have right permissions",255,0,0,true); 
    end  
end 
); 

: P

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...