-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You're welcome.
-
You know that the wiki is there for a reason?
-
What about changing the stat ID?
-
setPedStat takePlayerMoney
-
You're welcome .
-
"ipairs" is used for indexed tables, yours isn't.
-
SATHLER_Button = { } SATHLER_Button [ "btn_mute" ] = guiCreateButton(170, 75, 100, 30, "Mute", false) SATHLER_Button [ "btn_kick" ] = guiCreateButton(275, 75, 100, 30, "Kick", false) for name, button in pairs ( SATHLER_Button ) do guiSetFont ( button, "default-bold-small" ) end
-
You must trigger a event from server side when he successfully logs in. -- client side: GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Radio = {} LoginWindow = guiCreateWindow(0.2763,0.3467,0.4863,0.3633,"Ventana de Loggeo",true) guiWindowSetMovable(LoginWindow,false) guiWindowSetSizable(LoginWindow,false) GUIEditor_Label[1] = guiCreateLabel(21,63,52,21,"Nick :",false,LoginWindow) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Edit[1] = guiCreateEdit(63,58,126,28,"",false,LoginWindow) GUIEditor_Label[2] = guiCreateLabel(19,110,74,19,"Contraseña : ",false,LoginWindow) GUIEditor_Edit[2] = guiCreateEdit(94,105,126,28,"",false,LoginWindow) GUIEditor_Label[3] = guiCreateLabel(19,147,227,19,"Si no Tienes una Cuenta registrate aqui : ",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(19,168,100,36,"Registrarme",false,LoginWindow) GUIEditor_Checkbox[1] = guiCreateCheckBox(227,107,115,27,"Recordar Datos",false,false,LoginWindow) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(229,55,97,35,"Logearme",false,LoginWindow) GUIEditor_Label[4] = guiCreateLabel(196,188,181,16,"GUI Creada por ElMota (c) 2012",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[4],255, 255, 0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Radio[1] = guiCreateRadioButton(17,26,81,21,"Español",false,LoginWindow) guiRadioButtonSetSelected(GUIEditor_Radio[1],true) GUIEditor_Radio[2] = guiCreateRadioButton(109,26,81,21,"English",false,LoginWindow) RegisterWindow = guiCreateWindow(0.2937,0.3533,0.4437,0.3517,"Ventana de Registrarse",true) guiWindowSetMovable(RegisterWindow,false) guiWindowSetSizable(RegisterWindow,false) GUIEditor_Label[5] = guiCreateLabel(11,26,142,17,"Pon datos que no Olvides",false,RegisterWindow) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Label[6] = guiCreateLabel(9,52,140,20,"---Datos Importantes.",false,RegisterWindow) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Label[7] = guiCreateLabel(12,85,52,21,"Nick :",false,RegisterWindow) guiSetFont(GUIEditor_Label[7],"clear-normal") GUIEditor_Edit[3] = guiCreateEdit(50,80,100,26,"",false,RegisterWindow) GUIEditor_Label[8] = guiCreateLabel(12,127,87,17,"Contraseña :",false,RegisterWindow) guiSetFont(GUIEditor_Label[8],"clear-normal") GUIEditor_Edit[4] = guiCreateEdit(100,122,100,26,"",false,RegisterWindow) GUIEditor_Label[9] = guiCreateLabel(12,179,42,16,"Sexo :",false,RegisterWindow) guiSetFont(GUIEditor_Label[9],"clear-normal") GUIEditor_Radio[3] = guiCreateRadioButton(62,174,65,25,"Hombre",false,RegisterWindow) guiRadioButtonSetSelected(GUIEditor_Radio[3],true) guiSetFont(GUIEditor_Radio[3],"default-bold-small") GUIEditor_Radio[4] = guiCreateRadioButton(134,174,65,25,"Mujer",false,RegisterWindow) guiSetFont(GUIEditor_Radio[4],"default-bold-small") GUIEditor_Label[10] = guiCreateLabel(216,29,52,16,"ESPAÑOL",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[10],0,0,255) guiSetFont(GUIEditor_Label[10],"default-bold-small") GUIEditor_Label[11] = guiCreateLabel(294,29,52,16,"ENGLISH",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[11],0,0,255) guiSetFont(GUIEditor_Label[11],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(215,69,123,39,"Registrarme !",false,RegisterWindow) guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) guiEditSetMasked(GUIEditor_Edit[2],false) guiEditSetMasked(GUIEditor_Edit[4],false) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,true) showCursor(true) guiSetText(GUIEditor_Edit[1], ""..getPlayerName( localPlayer ).."") end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(RegisterWindow,true) guiSetVisible(LoginWindow,false) elseif source == GUIEditor_Button[3] then guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) showCursor(false) end end ) function clientSubmitLogin ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[1]) local password = guiGetText(GUIEditor_Edit[2]) if ( username and password ) then triggerServerEvent("submitLoginEM", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") end end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], clientSubmitLogin, false) addEvent ( "closeLoginGUI", true ) addEventHandler ( "closeLoginGUI", root, function ( ) guiSetVisible ( LoginWindow, false ) guiSetVisible ( RegisterWindow, false ) showCursor ( false ) end ) -- server side: function loginHandler(username,password) local acc = getAccount(username, password) if (acc) then logIn ( source, acc, password ) fadeCamera(source, true) setCameraTarget(source) triggerClientEvent ( source, "closeLoginGUI", source ) outputChatBox("Enjoy your time!", source) else outputChatBox("invalid username and password. Please re-connect and try again.", source) end end addEvent("submitLoginEM",true) addEventHandler("submitLoginEM",root, loginHandler)
-
I really doubt someone will script for just Admin powers, you should offer money.
-
onClientMarkerHit guiCreateWindow guiCreateGridList guiGridListAddRow guiGridListSetItemText guiCreateButton onClientGUIClick
-
Ya esta disponible la descarga De Qt to lua
Castillo replied to starksZ's topic in Recursos y aportes
@oter001: Primero, el Qt to Lua esta disponible hace mucho tiempo, 1 año talvez? Segundo, en que año vivis vos? megaupload esta cerrado hace meses -
Try this: --server function createSQLOnStart ( ) executeSQLCreateTable ( "Groups", "Name STRING, Owner STRING, Admin STRING, Members INT") end addEventHandler ( "onResourceStart", resourceRoot, createSQLOnStart ) function addInfoToSQL ( GroupName ) local sourcename = getAccountName ( getPlayerAccount ( source ) ) local result = executeSQLSelect ( "Groups", "Name", "Name = '" .. GroupName .. "'" ) if ( result == false ) then outputChatBox ( "This is your first time here! Welcome ".. sourcename .."!", source ) executeSQLInsert ( "Groups", "'".. GroupName .."', '".. sourcename .."', 'none','1'" ) else outputChatBox ( "Some One Use This Group Name !", source, 111, 111, 0 ) outputChatBox ( tostring ( result ), source ) outputChatBox ( GroupName, source ) end end addEvent( "Make_Group", true ) addEventHandler ( "Make_Group", getRootElement(), addInfoToSQL )
-
That is just a weapon object, you can't make it shoot like a real weapon, well, by scripting it, you can, but not that easy.
-
As far as I know, this was stolen from TG server ( or something similar ). We don't support people who steal other's work. Topic locked.
-
@Jaysd1: I think that he want's so players can after press "Control + V" and paste it.
-
Movido a "Scripting". Eso no tiene el menor sentido. exports.dxscoreboard:scoreboardAddColumn ( "Cuenta" ) function showAccount ( account ) setElementData ( source, "Cuenta", getAccountName ( account ) ) end addEventHandler ( "onPlayerLogin", getRootElement(), showAccount )
-
You're welcome. P.S: "value" is the column name.
-
May I ask why are you using Ryden's MySQL module? you could use the built-in MySQL functions which are a lot easier to use. dbConnect dbExec dbQuery dbPoll dbFree
-
You haven't connected to the MySQL server, and "connect" variable is nil.
-
This forum is for Lua scripting, you may want to ask someone on the IRC channel. Topic locked.