Jump to content

novo

Members
  • Posts

    325
  • Joined

  • Last visited

Everything posted by novo

  1. So, at the start of the .lua*s i must add: local handler = mysql_connect("127.0.0.1", "****", "******", "n30x") ¿? Plz help <3 and thank you
  2. Hi all. I wanna set: handler = mysql_connect("127.0.0.1", "****", "******", "n30x") It's for example if i later do: sql = executeSQLSelect it doesn't know to wich database connect. I wanna know how to make mysql_connect for all the code. I don't want to add mysql_connect to all functions. Please help
  3. novo

    Help with code

    Bad argument @ "setMaxPlayers"
  4. novo

    Help with code

    Haber, no pedi ayuda aquí para que tu vayas y me digas que debo aprender. Vine aqui, porque NO ENTIENDO ! HABER ENTERATE.
  5. novo

    Help with code

    Hi all. I want make a command for setMaxPlayers Here's my code: function ( playerSource, commandName ) numbermax = getMaxPlayers () if not col2 then col2 = numbermax end -- Set the vehicle's color setMaxPlayers(numbermax) end end end addCommandHandler ( "setmax", ) My command is /setmax but i don't know to do /setmax option. I don't know to fix that code. PLZ HELP ME <3
  6. novo

    Help with setmax

    Thank you all. That didn't work because i had max. server slots as 32. Then i didn't can set more than 32. Bye<3
  7. novo

    Help with setmax

    Not working >_< i tried with all numbers (less than 120)
  8. novo

    Help with setmax

    Thanks <3 EDIT: It's not working When i go to admin panel, resources tab, execute command and i copy it and i click to server. It says bla bla bla: false. It's not working Plz help
  9. Hi all. I want use setMax, to change my server max players with panel at resources tab. I don't know the correct syntax of: setMax Please help <3
  10. novo

    Help with a code

    It's not working EDIT: addEvent("onClientTrainingModeEnter", true) addEventHandler("onClientTrainingModeEnter", root, function() local vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do local x, y = getVehicleTurretPosition ( vehicleValue ) spawnPlayer (source, x, y, z) end end ) I think that's the correct syntax to get it.
  11. novo

    Help with a code

    So, it must be: local x,y,z = getElementPosition() or ? PD: I'm noob at lua..
  12. novo

    Help with a code

    CapY, i want know what should i type on the side of it. I know that it is not working, i want to know the correct syntax to add.
  13. Hi all. I want get with local x,y,z the position of where the player spawns on map start. The server-side function is: addEvent("onClientTrainingModeEnter", true) addEventHandler("onClientTrainingModeEnter", root, function() local x,y,z = getSpawnPostion() spawnPlayer (source, x, y, z) end ) Here is the client-side function: function enterTraining() if not isChatBoxInputActive() and not isConsoleActive() then unbindKey("enter", "down", enterTraining) removeEventHandler("onClientRender", root, drawTrainingText ) if #checkPoints > 1 then table.remove(checkPoints, #checkPoints) end triggerServerEvent("onClientTrainingModeEnter", me, checkPoints[#checkPoints]) end end I want get the spawn position with this: local x,y,z = getSpawnPostion() But i don't know wich is the correct syntax to get it. I don't know if it's getSpawnPostion(). Please help me
  14. Hi all. I found a script for matrix camera on countdown. I don't know why it's not working, please help me: Client-side: (countC.lua) ------------------------------------------------------------------------ --Copyright ©, Jesseunit --Please, do not Re-distribute ------------------------------------------------------------------------- local start = getTickCount(); local duration = 5000; local screenWidth, screenHeight = guiGetScreenSize(); local font = "bankgothic"; local scale = 2; local jij = getLocalPlayer() countMsg = { "Get ready for the countdown..." } local text = countMsg[#countMsg]; function addText(text) table.insert(countMsg, text) end addEvent("addTextdoor", true) addEventHandler("addTextdoor", root, function(text) addText(text) end ) function countRender() if stoprender == false then if not tickcount then tickcount = getTickCount () end if not alpha then alpha = 255 end local seconds = getTickCount() - tickcount alpha = alpha - (seconds / 200) alpha2 = alpha - 105 if alpha2 <= 0 then alpha2 = 0 end if alpha <= 0 then removeEventHandler("onClientRender", getRootElement(), countRender) alpha = 0 end else alpha2 = 150 alpha = 255 end local now = getTickCount() local time = now - start local width = dxGetTextWidth(text, scale, font) dxDrawRectangle(0, screenHeight-400.0, screenWidth, 50, tocolor(0, 0, 0, alpha2 or 150)) if (time > duration) then start = now text = countMsg[math.random(1, #countMsg)] return end local modi = duration - time dxDrawText(text, math.mod(modi, duration) / duration * (screenWidth + width) - width, screenHeight-408.0, 0, 0, tocolor(0, 161, 255, alpha or 255), scale, font) end function onClientRaceStateChanging ( newStateName, oldStateName) if oldStateName == "PreGridCountdown" then stoprender = true addEventHandler("onClientRender", getRootElement(), countRender) end if newStateName == "GridCountdown" then setTimer(function() stoprender = false end, 3500, 1) local x,y,z = getElementPosition(getPedOccupiedVehicle(jij)) timer1 = setTimer(setCameraMatrix, 6000, 1, x + 1, y + 4, z + 2, x, y, z, 10, 0) timer2 = setTimer(setCameraMatrix, 7000, 1, x + 5, y - 4, z + 4, x, y, z, 55, 0) timer3 = setTimer(setCameraMatrix, 8000, 1, x - 3, y + 5, z + 3, x, y, z, 21, 0) end if newStateName == "Running" then setCameraTarget(jij) end end addEvent( "onPlayersReady", true ) addEventHandler( "onPlayersReady", getRootElement(), onClientRaceStateChanging ) function restartMap() killTimer(timer1) killTimer(timer2) killTimer(timer3) end addCommandHandler("redo",restartMap) Server-side: (countS.lua) addEvent("onRaceStateChanging", true) addEventHandler("onRaceStateChanging", getRootElement(), function(newStateName, oldStateName) triggerClientEvent ( "onPlayersReady", getRootElement(), newStateName, oldStateName) end) Meta.xml: <meta> <info author="Jesseunit" version="1" type="script" /> <script src="countC.lua" type="client" /> <script src="counts.lua" type="server" /> </meta> Please help. Thanks <3
  15. Hi all. I want move the chatbox to another side. I want to move it like: x, y, z or how it can be moved. Does anyone know to do it ? Plz help me <3
  16. It's working Kenix, thank you <3. Evil-Cod3r, i have SQL installed on server. Bye <3
  17. Nothing on debugscript 3. When i'm the last alive player, i don't get money. That happens.
  18. Hi all. I need help with this code: function DestructionMoney2() local alivePlayers = getAlivePlayers() if info == "Destruction derby" then if #alivePlayers == 1 then local playername = getPlayerName(alivePlayers[1]) local serial = getPlayerSerial(alivePlayers[1]) local oldData = executeSQLSelect( "RaceStats", "RaceWins","serial = '" .. serial .. "'") givePlayerMoney(alivePlayers[1], 1200) local oldData = executeSQLSelect( "RaceStats", "RaceWins","serial = '" .. serial .. "'") newData = tonumber(oldData[1]["RaceWins"]) + 1 setElementData(alivePlayers[1],"Points",tonumber(getElementData(alivePlayers[1],"Points"))+5) setElementData(alivePlayers[1],"Race Wins",tonumber(getElementData(alivePlayers[1],"Race Wins"))+1) executeSQLUpdate ( "RaceStats", "RaceWins = '"..newData.."'","serial = '" .. serial .. "'") outputChatBox(getPlayerName ( alivePlayers[1] ) .. " has won $1200 for be the last player alive!",rootElement,0,255,0) end end end What's wrong on that code ? It gives you money when you're the last alive and it updates your data. Please help me. Bye <3
  19. Thanks evil <3 So the full code, must be like this: addEventHandler("onClientRender",root, function () local x,y = guiGetScreenSize() dxDrawText("Your money: ".. tostring(getPlayerMoney(localPlayer)),150,130,x,y,tocolor(255,255,255)) end) Answer plz Thx all <3 PD: Sorry for my bad english
  20. Thanks <3 Another question, how can i get player screen width and height ? I want to get it, because if anybody use a different screen, they can't see like me. Plz help <3<3
  21. Thanks <3 I have a question, How can i set to position 150, 130 ? Plz help <3
  22. Thanks ! What i want to do now is a dxtext where you see Money: Yourmoney on yourmoney, your money number. Plz help
×
×
  • Create New...