-
Posts
2,947 -
Joined
-
Last visited
Everything posted by JR10
-
The scripts you posted don't contain the onPlayerTimeSaverStart event. Post the part where you add and trigger onPlayerTimeSaverStart.
-
I don't help? Take a look around on the forums. Please refrain from being aggressive and understand that they're actually spending their time trying to help you. Now, let's stay on-topic.
-
We don't offer help with stolen scripts. Locked.
-
Why is it compiled? If it is a framework then it shouldn't be compiled.
- 14 replies
-
setTimer(function() reward = math.random ( 2000, 5000 ) qn1 = math.random ( 10, 100 ) qn2 = math.random ( 10, 100 ) qn3 = math.random ( 10, 100 ) theQuestion = qn1 + qn2 - qn3 answerTime = setTimer ( noAnswer, timeToAnswer * 1000, 1 ) outputChatBox ( "Math: First one to answer " .. qn1 .. " + " .. qn2 .. " - " .. qn3 .. " will win $" .. reward, root, 0, 255, 0 ) end, 120000, 0) -- call the function each 2 minutes
-
You can use setTimer to call the function several times.
-
Adjust it to your liking? Edit the width and height, fix it on 800x600 and it should look fine for the rest.
-
That's obvious really, the calculation is just like that. Use something like this: dxDrawImage ( (screenWidth / 800) * 753, (screenHeight / 600) * 295, screenWidth*0.1, screenHeight*0.1)
-
local screenWidth, screenHeight = guiGetScreenSize() dxDrawImage ( screenWidth - 47, screenHeight - 305, screenWidth*0.1, screenHeight*0.1)
-
The command handler function in client-side doesn't have a player parameter and neither do outputChatBox.
-
You should be using guiGridListGetItemText to get the text of the selected row. function trigMSG() if source == msgSend then local selectedRow = guiGridListGetSelectedItem(msgGRID) local choosedPlayer = guiGridListGetItemText(msgGRID, selectedRow, 1) triggerServerEvent("onMessagePM",resourceRoot,guiGetText(msgText),choosedPlayer) end end addEventHandler("onClientGUIClick",root,trigMSG) function privmsgplayer(msg,choosed) local target = getPlayerFromName(choosed) if (not isElement(target)) then return end outputChatBox("[PM] PM to " .. choosed .. ": " .. msg, client, 255, 0, 0, false) outputChatBox("[PM] PM from " .. getPlayerName(client) .. ": " .. msg, target, 255, 215, 0, false) end addEvent("onMessagePM",true) addEventHandler("onMessagePM",root,privmsgplayer)
-
Did you use guiGridListSetItemData anywhere? Post the code where you add rows.
-
Which should be self-explanatory, it also shows you which event is not added, this should be enough for you to find the error.
-
There's no such thing as "locking" a resource to a team. For superman, check this: viewtopic.php?f=91&t=92475#p832372 Moved to Scripting.
-
Is 'choosed' a string or a player element? What's the error?
-
triggerServerEvent("onMessagePM",localPlayer,guiGetText(msgText),choosedPlayer) You're sending the localPlayer as the base element, so the localPlayer will be pre-defined as source in the function. You have source as your first parameter, so, in this case, source is equal to the msgText's text. function privmsgplayer(msg,choosed) outputChatBox("[PM] PM to " .. getPlayerName(choosed) .. ": " .. msg, client, 255, 0, 0, false) outputChatBox("[PM] PM from " .. getPlayerName(client) .. ": " .. msg, choosed, 255, 215, 0, false) end addEvent("onMessagePM",true) addEventHandler("onMessagePM",root,privmsgplayer) function trigMSG() if source == msgSend then local selectedRow = guiGridListGetSelectedItem(msgGRID) local choosedPlayer = guiGridListGetItemData(msgGRID, selectedRow, 1) triggerServerEvent("onMessagePM",resourceRoot,guiGetText(msgText),choosedPlayer) end end addEventHandler("onClientGUIClick",root,trigMSG)
-
You tell me? If it's not hard, why are you posting for help? How about you chill? YOU are the one who's failing, and THEY are trying to help you. Your English isn't helping either.
-
There are already 3 examples on the wiki page.
-
It's triggered from client-side, so yes, client is defined.
-
Not even when it's empty, it will be the same without 'First message', that is, a table inside a table.
-
It's because the script doesn't load correctly. You're missing an end in the submitRegister event. addEvent("submitRegister", true) addEventHandler("submitRegister", root, function ( password ) local account = getAccount(getPlayerName(client), password) if account == false then local accountAdded = addAccount(getPlayerName(client), password) if accountAdded then outputChatBox("Thank you for registering", client) triggerClientEvent(client, "showLogin", client) else outputChatBox("Something was bad! Contact the administrator!!", client) end end end )
-
Line 13 is where the function returns the string if hours exceed one. Change it to: return tostring(hours)..":"..tostring(m)
-
List of animations can be found here: https://wiki.multitheftauto.com/wiki/Animations
-
Did you change the database connection parameters? There's an installation tutorial video, check it out.
-
Why 2 shaders that do the exact same thing?