Price. Posted November 3, 2013 Share Posted November 3, 2013 actually this is new for me the mysql and stuff but uhm i was trying to make punishlog so i can do /punishlog opens me a gui so far i made that gui and command the thing i need help with is , when i mute or jail or ban....etc those kind of punishments it gets written in the player's punishlog and also i couldn't make the /punishlog to appear to specific person, i mean when i do /punishlog it appears for me only and for my serial number only bec of the punishments for me and if anyon e else did /punishlog it opens it for his serial number only, need help GUIEditor = { tabpanel = {}, tab = {} } windowhelp = guiCreateWindow(0, 0, 800, 600, "Punish Log", false) guiWindowSetSizable(windowhelp, false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 33, 781, 557, false, windowhelp) GUIEditor.tab[1] = guiCreateTab("PunishLog", GUIEditor.tabpanel[1]) rulesEN = guiCreateMemo(4, 4, 773, 525, "", false, GUIEditor.tab[1]) guiMemoSetReadOnly(rulesEN, true) buttonclose = guiCreateButton(691, 24, 99, 29, "Close Window", false, windowhelp) guiSetVisible (windowhelp,false) function windowhelpopen() if guiGetVisible (windowhelp) == true then guiSetVisible (windowhelp,false) showCursor (false) else showCursor (true) guiSetVisible (windowhelp,true) end end addCommandHandler( "punishlog", windowhelpopen ) function windowhelpclose () if source == buttonclose then showCursor (false) guiSetVisible (windowhelp,false) end end addEventHandler ("onClientGUIClick", root, windowhelpclose) function createFileHandler() local RootNode = xmlCreateFile("new.xml"," newroot") local NewNode = xmlCreateChild(RootNode, "newchild") xmlSaveFile(RootNode) end addCommandHandler("createfile", createFileHandler) Link to comment
TAPL Posted November 3, 2013 Share Posted November 3, 2013 Was you talking about mysql? I can't find anything related to mysql in your code, as i can see it's seems you did nothing at all. From variable names: windowhelp and rulesEN and copy past wiki example from function xmlCreateFile. It seems to me you are trying to do a mix of codes from other resources and wiki examples? Can this mix give you a working script at the end? Nope rather than that, try to learn something instead of the mixture you posted here because it make no sense at all. Link to comment
pa3ck Posted November 3, 2013 Share Posted November 3, 2013 What I would do is, set /punishlog server side then trigger it to client side with the getPlayerFromName variable ( the player you want to see the GUI) and if the local player is the player you want then set the gui visible. Like: --Server addCommandHandler('punishlog', function(playerSource, command, target) local targetplayer = getPlayerFromName(target) if targetPlayer then triggerClientEvent(getRootElement(), 'openGUI', target) end end) --Client addEvent('openGUI', true) addEventHandler('openGUI', getRootElement(), function ( target ) if target == getLocalPlayer() then --set your gui visible end end) Link to comment
Price. Posted November 3, 2013 Author Share Posted November 3, 2013 actually someone told me to make that XML thingy, and i really have no idea how to make mysql or sql stuff to get this done. yea but it i still need the punishments gets written when i mute or ban anyone. Link to comment
TAPL Posted November 3, 2013 Share Posted November 3, 2013 https://wiki.multitheftauto.com/wiki/OnPlayerBan https://wiki.multitheftauto.com/wiki/OnPlayerMute Link to comment
Price. Posted November 3, 2013 Author Share Posted November 3, 2013 well my point is when i mute them or ban them it gets written in the punishlog of a specific player i banned or muted, Ex: i banned someone called Price Price has been banned be price for 3 hrs Punishlog: 3/11/2013 Price has been banned for 3 hours reason: test Link to comment
Price. Posted November 4, 2013 Author Share Posted November 4, 2013 so can anyone help? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now