-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
My Number One? Not sure though.
-
guiGridListClear clears (deletes) all the rows in the grid list. So it won't magically update the grid list alone. You must loop through it again, which is not necessary. Just onClientResourceStart, loop through players, and add them. And onJoin, add him. onQuit you can use this function: function guiGridListRemoveRowByName ( gridlist , column , name ) for index = 1 , guiGridListGetRowCount ( gridlist ) do if guiGridListGetItemText ( gridlist , index , column ) == name then guiGridListRemoveRow ( gridlist , index ) break end end end
-
You are not adding any rows. You are just setting the text. driversList = guiCreateGridList(28,85,146,149,false,bigWindow) local column = guiGridListAddColumn(driversList, "Drivers", 0.85) if (column) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( driversList ) guiGridListSetItemText(driversList, row, column, getPlayerName(playeritem), false, false) end end guiGridListSetItemColor ( driversList, row, column, 255, 150, 0 ) guiGridListSetScrollBars ( driversList, true, true ) And if you are updating later use, guiGridListClear it will clear all rows.
-
MTA Wiki: https://wiki.multitheftauto.com/wiki/Main_Page Server Manual (Where you will find how to start your server and put resources on it): https://wiki.multitheftauto.com/wiki/Server_Manual
-
You can use shader_tex_names (thanks ccw) to find texture names to use with engineApplyShaderToWorldTexture. You can download it from the wiki.
-
Next time tell us what happens. outputChatBox("War_System|x[Dev-PoinT]x!",root,255,255,0) function xxx (ammo, killer, killerweapon, bodypart ) if (killer) and (killer ~= source ) then giveWeapon ( killer, 39, 2, true ) local sound = playSound("sounds/PSiren.mp3") setSoundVolume(sound, 0.5) outputChatBox(getPlayerName(killer) .." has Now a Special Weapon, watch out!", getRootElement(), 255, 255, 0) end end addEventHandler ("onPlayerWasted",getRootElement() , xxx) And for your start message, you better add it client side , onClientResourceStart.
-
Your client, it's not the used code right? Because if so, you are not creating the GUI right. And what happens exactly, use /debugscript 3.
-
I don't care if I am rude, but I have to say it, you never learn from your mistakes. Same question is asked daily. Same problems.
-
Just like MOJRM, talked bad in a post, and when you helped him, GOD!. You welcome anyway.
-
Do you know what you are doing, the script won't do things itself. As you can see you only added Waiting on resource start, and Dead when he dies. You didn't add on spawn change to alive. Add this: function onPlayerSpawn() setElementData( source, "State", "Alive" ) end addEventHandler( "onClientPlayerSpawn", getRootElement(), onPlayerSpawn)
-
Lol? No one can help you get unbanned except the owner. Not the place to ask either.
-
A: Topic going from shit to bull shit, used to be funny, now just a post count increaser. Q:Don't you think so?
-
The scoreboard resource isn't running.
-
I just added the function, you must trigger it.
-
Don't just ask for help, tell us what happens. server: exports.scoreboard:scoreboardAddColumn ( "State" ) client: addEventHandler ( "onClientResourceStart", resourceRoot, function () setElementData( getLocalPlayer ( ), "State", "Waiting" ) end ) function onPlayerDead( ammo, attacker, weapon, bodypart ) setElementData( source, "State", "Dead" ) end addEventHandler( "onClientPlayerWasted", getRootElement(), onPlayerDead )
-
What is this. killTimer on function. And exactly when the function starts. local matrixCams = { --{positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov} {1614.837, -1301.275, 138.188, 200, 400, 102,0,180}, --LS {2052.229, 1559.058, 20.671, 125, 200, 101, 0, 150}, --LV {-1856.736, 807.699, 115.546, 300, 250,99.98, 70, 90}, --SF {1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316,0,180}--Vinewood Sign } local index = 1 function switchMatrixCams() local positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov = unpack(matrixCams[index]) if getCameraMatrix() then setCameraMatrix(positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov) camTimer = setTimer(switchMatrixCams,10000,1) index = index + 1 if index > #matrixCams then index = 1 end end end function setCameraOnPlayerJoin() -- set the player's camera to a fixed position, looking at a fixed point addEventHandler("onClientGUIClick", Button1[1],camTarget, false ) addEventHandler("onClientGUIClick", Btn2[2],camTarget, false ) addEventHandler("onClientGUIClick", Btn3[3],camTarget, false ) switchMatrixCams ( ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),setCameraOnPlayerJoin) function stopCamSwitch ( ) killTimer ( camTimer ) end Use stopCamSwitch to stop camera switching.
-
You welcome.
-
Thanks.
-
local table = { posX , posY , posZ } local posX , posY , posZ = unpack ( table ) Unpacks the table, a table have x, y, z coordinates. you can do: x, y, z = unpack(table) local matrixCams = { --{positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov} {1614.837, -1301.275, 138.188, 200, 400, 102,0,180}, --LS {2052.229, 1559.058, 20.671, 125, 200, 101, 0, 150}, --LV {-1856.736, 807.699, 115.546, 300, 250,99.98, 70, 90}, --SF {1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316,0,180}--Vinewood Sign } local index = 1 function switchMatrixCams() local positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov = unpack(matrixCams[index]) if getCameraMatrix() then setCameraMatrix(positionX,positionY,positionZ,lookAtX,lookAtY,lookAtZ, roll, fov) setTimer(switchMatrixCams,10000,1) index = index + 1 if index > #matrixCams then index = 1 end end end function setCameraOnPlayerJoin() -- set the player's camera to a fixed position, looking at a fixed point addEventHandler("onClientGUIClick", Button1[1],camTarget, false ) addEventHandler("onClientGUIClick", Btn2[2],camTarget, false ) addEventHandler("onClientGUIClick", Btn3[3],camTarget, false ) switchMatrixCams ( ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),setCameraOnPlayerJoin)
-
serverFFS got the worst support ever.
-
There is no way to make a script "undecompilable", AFAIK.
-
Actually, if the char name exists, there will be no resultado [ 1 ], so basically you are reversing it. function checarConta(nome) local resultado = {} for i,v in pairs (getAccounts()) do if getAccountData(v,"char.nome") == tostring(nome) then return else table.insert(resultado,v) break end end outputChatBox(resultado[1],source) if not resultado[1] then --resultado={} outputChatBox("Fails",source) elseif resultado[1] then outputChatBox("Works",source) setElementDimension ( source, 0) setPlayerName ( source,tostring(nome) ) local UsuarioCn = getPlayerAccount(source) setAccountData(UsuarioCn,"char.passouNoTutorial",true) setAccountData(UsuarioCn,"char.nome",nome) triggerClientEvent ( source, "DetectarNomeWin", source) end end addEventHandler ( "checarConta", getRootElement ( ), checarConta)
-
It won't work either, because you still trying to call a table. Should be a function for getting data and setCameraMatrix.