Jump to content

Zonex Favel

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Zonex Favel

  1. function makeTables() executeSQLCreateTable("locations", "location_name TEXT, location_pos TEXT") doInsertQ = executeSQLQuery("INSERT INTO locations VALUES ('origin', 'x=0y=0z=0')") if(doInsertQ) then outputConsole("insert Query successful") end doInsertE = executeSQLInsert("locations", "'origin', 'x=0y=0z=0'") if(doInsertE) then outputConsole("easy insert Query successful") end doSelectQ = executeSQLQuery("SELECT location_pos FROM locations WHERE location_name = 'origin'") if(doSelectQ) then outputConsole("select Query successful") end doSelectE = executeSQLSelect("locations", "location_pos", "location_name ='origin'") if(doSelectE) then outputConsole("easy select Query successful") end end addEventHandler( "onResourceStart", getResourceRootElement(getThisResource()),makeTables) I get these errors from the SQLQuery functions, the other two seem to work fine. They don't do an output message but they don't give me any errors.
  2. Thank you for your help. I was trying to avoid those because of SQL injection attacks but I should protect against those myself anyways.
  3. My first question is does the database get completely written over when you create a new table, and do all the values get erased? I'm also having trouble with using the executeSQLQuery function. Table executeSQLCreateTable("Players","player_id TEXT, player_username TEXT, player_password TEXT") functions not working function registerPlayer(playerName, pass) [b]regSuccess = executeSQLQuery("INSERT INTO Players VALUES ('001',?,?)", playerName, pass)[/b] if(regSuccess) then outputChatBox("Registration Success") end [b]player = executeSQLQuery("SELECT player_password FROM Players WHERE player_username='gamemode'")[/b] end The first one gives me then the first line.The second one gives me then the second line.Thanks for the help in advance everyone
  4. Here you go function playerJoin () setCameraMode(source, "fixed") setTimer(setCameraPosition, 1000, 1, source, 2495.1257324219, -1686.6124267578, 153.513834953308) setTimer(setCameraLookAt, 1000, 1, source, 1495.1257324219, -186.6124267578, 120.513834953308) fadeCamera(source,true) end addEventHandler("onPlayerJoin", getRootElement(), playerJoin)
  5. Hello Everyone, I'm having trouble making my buttons click and work. Here's the code: local logWin = guiCreateWindow(0.3,0.3,0.25,0.2,"Log On", true) local username = guiCreateEdit(0.35,0.3,0.55,0.15,"",true,logWin) local password = guiCreateEdit(0.35,0.5,0.55,0.15,"",true,logWin) local logButton = guiCreateButton(0.05,0.7,0.25,0.2,"Sign In",true,logWin) local regButton = guiCreateButton(0.7, 0.7,0.25,0.2,"Register",true,logWin) function loginScreen() guiCreateLabel(0.05,0.3,0.3,0.2,"Username:",true,logWin) guiCreateLabel(0.05,0.5,0.3,0.2,"Password:",true,logWin) end addEventHandler("onClientResourceStart",getRootElement(),loginScreen) function sendLogInfo() local usrname = guiGetText(username) local pass = guiGetText(password) triggerServerEvent("login",getRootElement(), usrname, pass) end addEventHandler("onClientGUIClick", logButton, sendLogInfo) function registerWin() outputChatBox("Need register GUI") end addEventHandler("onClientGUIClick", regButton, registerWin) I put all of the GUI outside of the login screen function because I thought that was the problem, it's easy to move back in if I have to. They show either way though. Thanks for the advise in advance.
  6. I think it's because there is only one map for fallout and that is the default one. Don't hold me to it though.
  7. I figured out the problem you have to fade in the camera first.
  8. I've been having a problem getting the camera to work too and all the posts on the subjects aren't getting answered or resolved from what I can tell. Is there something wrong with the Camera function? Does it have to be done at a certain time? I've copied exact code from the wiki and posts from other posters and I still can't get the Camera to work right. Here's the code I have on it function setCamPosition() toggleCameraFixedMode(true) setCameraPosition(-16.268127441406, -46.674671173096, 29.565118789673) setCameraLookAt(-68.21085357666, 34.687622070313, 11.11138343811) end addEventHandler("onClientResourceStart", getRootElement(),setCamPosition) EDIT: If your screen is staying black you need fade in first.
  9. Cool Like your's better. Thanks for the help. I was trying to do that all day but I ended up with my script because I couldn't get it done. EDIT: Having trouble getting this to work, did you use other scripts?
  10. Made this position script because I wanted an easier way for spawn points too. It can use improvement but here it is function getPos(thePlayer, command, place) local x,y,z = getElementPosition(thePlayer) local placeFile = place..".txt" local posTxt = fileOpen(placeFile) local mycoordinates = "X="..x.." Y="..y.." Z="..z if posTxt then fileWrite(posTxt, mycoordinates) else posTxt = fileCreate(placeFile) fileWrite(posTxt, mycoordinates) end fileClose(posTxt) outputChatBox("worked", thePlayer) end addCommandHandler("save", getPos) to use it just type "save " in the console and it will create a text file with that location name and the coordinates your at. You can also use "/save " in the chat window to execute it. If anyone has a better script or improvements to mine please post it!
  11. Hello I'm having the same problem. I was wondering do you have Windows Vista? EDIT: Hey I figured out what I was doing wrong I was using my global ip from outside the internet instead of the internal one. Try doing that. If you have I don't know how to help you either. So instead of the one from somewhere like ip address.com use the one from your subnet. Use your cmd.exe and the command ipconfig /all to get the ip your looking for. Also if the server is on the same computer your trying to connect from you can use "localhost" then the port number to access it instead of the subnet ip like I suggested above.
  12. Hey to run a game mode just put in "gamemode " in the console window without quotes so if I wanted to do a classic death match I would type"gamemode cdm cdm_ls" to start the gamemode. Also gamemodes some gamemodes don't have maps so you you can do something like "gamemode hay" and it will run it for you. Check your resources folder for the names of the modes, they're pretty easy to figure out. Hope that helps.
  13. I was wondering if the new gta san andreas released to prevent mods will have any effect on the gta blue. I was reading on how the game got a rating of AO and they were making a new non-moddable version to keep the game from being modded.
×
×
  • Create New...