-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
No. The code itself is messed up.
-
You shouldn't check for money on the client-side, use the table to check for the price server-side.
-
This should be easy for you to fix. local db_host = "localhost" local db_username = "" local db_password = "" local db_table = "blbalbalba" local db_port = "3306" local connection = false function connect() connection = dbConnect("mysql","dbname="..db_table..";host="..db_host..";port="..db_port,db_username,db_password) if (connection) then outputConsole("A szerver sikeresen csatlakozott az adatbázishoz.",1) return true else outputConsole("Nemsikerült csatlakozni az adatbázishoz újrapróbálás 5 másodperc múlva...",1) setTimer(connect,5000,1) end end addEventHandler("onResourceStart",resourceRoot,connect)
-
getPlayersInTeam isPedDead
-
This is probably right, however, it's different from your code.
-
You didn't specify the base element parameter. Server-side: local pickup = createPickup(2196.70,1677.11,12.36,3,1273,0) addEventHandler ( "onPickupHit", pickup, function( hitPlayer ) if (hitPlayer and getElementType ( hitPlayer ) == 'player' and not isPedInVehicle (hitPlayer) ) then triggerClientEvent(hitPlayer,"show", root) end end)
-
You're missing one column's value. Line 24: executeSQLQuery ( "INSERT INTO `Mute` ( PlayerSerial,Date,Name,By,Reason ) VALUES(?,?,?,?,?)",tostring(Serial),tostring(Date_Time),tostring(Name),tostring(By),tostring(Reason))
-
This shouldn't be a problem, if the function doesn't accept any parameters, providing it with ones won't matter.
-
What exactly is the problem here? The text is not there? Money doesn't update? Please explain better. If there are any errors please post them.
-
I know this doesn't help you nor answer your question but, why don't you just use the CEGUI one? It's efficient and bug-free. It doesn't have to be inside a window, just create it in the right position to suit the rest of your dx user interface.
-
Use getTickCount whenever the player opens the panel and store it. Then just compare that with the current tick. function openPanel() if (open_tick and getTickCount() - open_tick > 300000) then open_tick = getTickCount() -- code end end
-
You can replace models for certain players, however, you can't replace certain vehicles, you have to replace all the vehicles of the same model.
-
It isn't. Performance aside, it's better to use several resources. As for live updates, like Necktrox said, scheduled server restarts would do.
-
SQL help: Select multiple rows on each db execute
JR10 replied to -ffs-AbodyRulez's topic in Scripting
You would increment the first number only, which controls the starting at index. You're welcome. -
SQL help: Select multiple rows on each db execute
JR10 replied to -ffs-AbodyRulez's topic in Scripting
For the first 5, append: "LIMIT 0, 5" For the second 5, append: "LIMIT 5, 5" The first one is the start at index, 0 is the first row, 5 is the 6th row. The second one is the number of rows to get. -
function vipReplaceModele (_, acc) local accName = getAccountName (acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then triggerClientEvent (source, "onReplace", root ) end end addEventHandler('onPlayerLogin', root, vipReplaceModele) function replaceModele () local txd = engineLoadTXD("hydra.txd") engineImportTXD(txd, 520) local dff = engineLoadDFF("hydra.dff", 520) engineReplaceModel(dff, 520) end addEvent( "onReplace", true ) addEventHandler( "onReplace", root, replaceModele )
-
What about the development process though? You'll have to restart the whole game-mode to implement any change, however small it is. Another disadvantage is extensibility and collaboration. It won't be a walk in the park to allow others to contribute and test their work. The major advantage for me is OOP, classes and objects are much easier to work with.
-
local teams = {} function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do local name = xmlNodeGetAttribute(node, 'name') local index = 0 while (xmlFindChild(node, 'color', index) do local color_node = xmlFindChild(node, 'color', index) local red = xmlNodeGetAttribute ( color_node, "red" ) teams[name] = {"red" = red} index = index + 1 end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start) Though, this doesn't seem logical. If you have more than one color node, it will just be the last one's red value.
-
If there is more than one color child then you can do this to find them all: function start() local file = xmlLoadFile ( "datos.xml" ) local children = xmlNodeGetChildren ( file ) for index, node in pairs ( children ) do local index = 0 while (xmlFindChild(node, 'color', index) do local color_node = xmlFindChild(node, 'color', index) outputChatBox(xmlNodeGetAttribute ( color_node, "red" )) index = index + 1 end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), start)
-
It's available for you to download. Yes.
-
Post in the Arabic forum, perhaps this might suit you better. viewforum.php?f=119
-
There's no way to set a certain theme to all the players with existing gui. You either use what I gave you or make your own UI with dx functions.