Jump to content

ClientSide event "SetChatInput" ??


XetaQuake

Recommended Posts

Posted (edited)

hi, i need a clientside function that write in the chat by the player

why?:

i have a GUI script (not by me) and this is complete client side, now i want to build in a option window from this GUI script a button like "report".

so players can press this button and then the report window from admin.zip open so that player can report

my idea:

a function that write /report in the chat box (or report in the console) that this report window will be open

dont know what i mean? than connect to any server and write /report in the chat box :wink:

question:

can somebody help me with this? or is this at this moment not possibly?

Edited by Guest
Posted (edited)

nice!

can you pleas say me the client side version from this?:

function openAdminReport() 
    executeCommandHandler ( "report", playerSource ) 
end 

Edited by Guest
Posted (edited)
it's probably executeCommandHandler( "report" ).

dont work, no errors, no window, no warnings

If that doesn't work, use getLocalPlayer() as player-argument.

sorry but was is a player-argument? :oops:

Edited by Guest
Posted (edited)

ok i have test and learning a little bit

can somebody tell me why this dont work:

local localPlayer = getLocalPlayer ( ) 
  
function openAdminReport() 
    executeCommandHandler( "report", localPlayer ) 
end 

and i cant see any errors, warnings etc ;(

i hope for help 8)

Edited by Guest
Posted (edited)

ah pleas help me, its my last problem at this time for my gamemode :D

come on pleas

when i press the button noting happens, and i cant see any errors, warnings etc

the script have in my eyes no errors...realy strange

Edited by Guest
Posted

    {'btn', id='Report', onclick=openAdminReport}, 

local localPlayer = getLocalPlayer ( ) 
  
function openAdminReport() 
    executeCommandHandler( "report", localPlayer ) 
end 

Posted

Because i dont think that anybody answer, i explain the code better:

i use the Freeroam Gui, and i want to add a "Report" button in the Main Window (open with F1)

Here is the code from the main window (the red line at the end is the new line):

  
wndMain = { 
    'wnd', 
    text = 'FR GUI', 
    x = 10, 
    y = 150, 
    width = 280, 
    controls = { 
        {'lbl', text='Local player'}, 
        {'br'}, 
        {'btn', id='kill', onclick=killLocalPlayer}, 
        {'btn', id='skin', window=wndSkin}, 
        {'btn', id='weapon', window=wndWeapon}, 
        {'btn', id='clothes', window=wndClothes}, 
        {'btn', id='playergrav', text='grav', window=wndGravity}, 
        {'btn', id='warp', window=wndWarp}, 
        {'btn', id='stats', window=wndStats}, 
        {'br'}, 
        {'chk', id='jetpack', onclick=toggleJetPack}, 
        {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike},[/color] 
        {'br'}, 
         
        {'lbl', text='Pos:'}, 
        {'lbl', id='xpos', text='x', width=50}, 
        {'lbl', id='ypos', text='y', width=50}, 
        {'lbl', id='zpos', text='z', width=50}, 
        {'btn', id='setpos', text='map', window=wndSetPos}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Vehicles'}, 
        {'br'}, 
        {'lbl', text='Current:'}, 
        {'lbl', id='curvehicle'}, 
        {'br'}, 
        {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, 
        {'btn', id='repair', onclick=repairVehicle}, 
        {'btn', id='flip', onclick=flipVehicle}, 
        {'btn', id='upgrades', window=wndUpgrades}, 
        {'btn', id='color', window=wndColor}, 
        {'btn', id='paintjob', window=wndPaintjob}, 
        {'br'}, 
        {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, 
        {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, 
        {'br'}, 
        {'br'}, 
         
        {'lbl', text='Environment'}, 
        {'br'}, 
        {'btn', id='time', window=wndTime}, 
        {'btn', id='weather', window=wndWeather}, 
        {'btn', id='speed', window=wndGameSpeed} 
        [b][color=#FF0008]{'btn', id='Report', onclick=openAdminReport},[/color][/b] 
    }, 
    oncreate = mainWndShow, 
    onclose = mainWndClose 
} 
  

and here a the openAdminReport function:

  
local localPlayer = getLocalPlayer ( ) 
  
function openAdminReport() 
    executeCommandHandler( "report", localPlayer ) 
end 
  

the button are to see, but nothing happens when i click

note: all must be clientside

The server community want the gamemode and i want to release it so fast as i can :wink:

can someone help me?

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