-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
That function can hide parts or all the HUD, you must learn how to use it.
-
This question has been made more than two times, and the answer always been that you can't get the killer of the rocket that hit you, because you die when the vehicle explodes.
-
You can use showPlayerHudComponent to hide the radar.
-
You can use the server side text functions to create a text server side: https://wiki.multitheftauto.com/wiki/Ser ... _functions
-
Happy Birthday lil toady! I wish you all the best.
-
No tenes porque copiarlo, solo estudiar como funciona.
-
Valhalla gaming first person script: https://community.multitheftauto.com/index.php?p= ... ls&id=4029
-
_addCommandHandler = addCommandHandler function addCommandHandler( cmd, ... ) _addCommandHandler(cmd, ...) -- You have to call the function saved on the variable, else it'll make a stack overflow. table.insert(sCmds, cmd) end
-
Fijate aca: viewtopic.php?f=91&t=41314
-
The function get is server side only, you can't use it client side.
-
-- client side: local button = guiCreateButton( 0.7, 0.1, 0.2, 0.1, 'Output!', true ) local editBox = guiCreateEdit( 0.3, 0.1, 0.4, 0.1, 'Type your message here!', true ) guiEditSetMaxLength( editBox, 128 ) guiSetVisible( button, false ) guiSetVisible( editBox, false ) function outputEditBox ( ) local text = guiGetText( editBox ) triggerServerEvent ( "outputMessage", localPlayer, text ) end addEventHandler( 'onClientGUIClick', button, outputEditBox, false ) bindKey( 'F1', 'down', function( ) guiSetVisible( button, not guiGetVisible( button ) ) guiSetVisible( editBox, not guiGetVisible( editBox ) ) showCursor( not isCursorShowing( ) ) end ) -- server side: addEvent ( "outputMessage", true ) addEventHandler ( "outputMessage", root, function ( text ) for index, player in ipairs ( getElementsByType "player" ) do local accountName = getAccountName( getPlayerAccount( player ) ) if isObjectInACLGroup( "user.".. accountName, aclGetGroup( "Admin" ) ) then outputChatBox ( text, player ) end end end )
-
Vehicle mod: https://community.multitheftauto.com/index.php?p= ... ls&id=4026
-
You must add the resource to "acl.xml" on "Admin" group.
-
There's nothing to fix, and it's not that hard to add it, so everyone with some Lua experience can do it.
-
I know that, but what warning? I can't test the script right now. Post the debugscript warning.
-
Could you post the warnings/errors you got?
-
function passwordHandler(player, oldpassword, newpassword) local account = getPlayerAccount(player) if (account) then if (isGuestAccount(account)) then outputChatBox("You must be logged in to change your password.", player) return end local accountName = getAccountName ( account ) local password_check = getAccount(accountName, oldpassword) if (password_check ~= false) then if (string.len(newpassword) >= 5) then setAccountPassword(account, newpassword) triggerClientEvent(player, "hidePasswordWindow", getRootElement()) else outputChatBox("Your new password must be at least 5 characters long!", player) end else outputChatBox("Old password invalid.", player) end end end addEvent("submitChangepw", true) addEventHandler("submitChangepw", root, passwordHandler)
-
You added a event handler for: "clientSubmitChangepw" function, right? if you can, post the whole client side.
-
Show us how you trigger the event: "submitChangepw".
-
That function can get the local player time or the server time ( if you use it server side it should return server time ).
-
He want's the character name he just spawned to be on the scoreboard column.
-
function createGUI() screenWidth,screenHeight = guiGetScreenSize ( ) mainWidth = 320 mainHeight = 300 windowChangepw = guiCreateWindow(screenWidth/2-mainWidth/2,screenHeight/2-mainHeight/2,mainWidth,mainHeight,"Change Password",true) TextLabeOld = guiCreateLabel(9,40,84,18,"Old Password :",false,windowChangepw) TextLabelNewPW = guiCreateLabel(9,71,90,19,"New Password :",false,windowChangepw) editOldpw = guiCreateEdit(95,37,196,24,"",false,windowChangepw) editNewpw = guiCreateEdit(99,68,196,24,"",false,windowChangepw) ButtonChange = guiCreateButton(27,130,113,25,"Change it!",false,windowChangepw) ButtonCancel = guiCreateButton(252,130,113,25,"Cancel",false,windowChangepw) guiSetVisible ( windowChangepw, true ) guiWindowSetMovable ( windowChangepw, false ) guiWindowSetSizable ( windowChangepw, false ) guiLabelSetColor ( TextLabeOld, 150, 100, 0 ) addEventHandler( "onClientGUIClick", ButtonCancel, hidewindow, false ) end addEventHandler ( "onClientResourceStart", resourceRoot, createGUI ) function hidewindow ( ) end function changeMyPw() if (windowChangepw) then guiSetVisible ( windowChangepw, not guiGetVisible ( windowChangepw ) ) showCursor ( guiGetVisible ( windowChangepw ) ) end end addCommandHandler("changepw", changeMyPw)
-
Why should he use onPlayerWasted instead of onClientPlayerWasted which would be a lot easier for him.