Jump to content

Wei

Members
  • Posts

    814
  • Joined

  • Last visited

Everything posted by Wei

  1. for i = 1, maxPlayersInCurList do playerListLabels[i] = {} playerListLabels[i][1] = guiCreateLabel(10, 30 - 15 + 15 * i, 188, 17, "", false, GUIEditor.gridlist[1]) playerListLabels[i][2] = guiCreateLabel(207, 30 - 15 + 15 * i, 143, 17, "", false, GUIEditor.gridlist[1]) playerListLabels[i][3] = guiCreateLabel(364, 30 - 15 + 15 * i, 128, 17, "", false, GUIEditor.gridlist[1]) playerListLabels[i][4] = guiCreateLabel(501, 30 - 15 + 15 * i, 37, 18, "", false, GUIEditor.gridlist[1]) end when I try to change the one of the labels like this guiSetText( playerListLabels[1][4], "woo" ) I get error: Attempt to index field '?' (a nil value)
  2. Wei

    help script.

    function antOfensa () x = string.gsub("bitch", "bitch","I Love You") --string.gsub(text, selectedWord, wordToReplace) --> x="I Love You" end
  3. Wei

    Timer Problem

    waitTimer = {} function playerChat(message, messageType) if messageType == 0 then cancelEvent() if waitTimer[source] then return exports["[PG]dxBox"]:dxOutput(source,"You must wait 5 seconds between every message!", 255, 0, 0) end if not isGuestAccount(getPlayerAccount(source)) then if hasObjectPermissionTo ( source, "function.kickPlayer", false ) then outputChatBox(getPlayerName(source).."[A]: #FFFFFF"..message, root, 200, 200, 200, true ) outputServerLog("CHAT: "..getPlayerName(source)..": "..message) else outputChatBox(getPlayerName(source)..": #FFFFFF"..message, root, 255, 255, 255, true ) outputServerLog("CHAT: "..getPlayerName(source)..": "..message) waitTimer[source] = setTimer( function() end, 5000, 1 ) end else exports["[PG]dxBox"]:dxOutput(source,"You must be logged in to type in chatbox!", 255, 0, 0) end end end addEventHandler("onPlayerChat", root, playerChat) After 5 sec it still saying you must wait 5 sec between every message....
  4. Wei

    Zombie Skins help

    http://lmgtfy.com/?q=zombie+skins+gta+san+andreas
  5. Wei

    Server earnings

    I was thinking to make a unique server(something completly difrent) and i was wondering (This questions are mostly for server owners wich has 50+ players constantly) How much does popular servers earn per month? Is it worth it to put so much time for scripting ? How is your social life( school, friends, girlfriends )? Thanks for your answers! Blazy
  6. Wei

    Is this possible

    Hi, I was having a bit of relaxation scripting( Like making cool looking guis and stuff). And i was wondering if is it possible to rotate gui Window ? I've tryed with guiSetProperty but it didn't work out for me.
  7. -- SERVER addEvent("SaddNotification", true) function SaddNotificationHandler( text, red, green, blue, player ) triggerClientEvent("CaddNotification", player, text, red, green, blue ) end addEventHandler("SaddNotification", root, SaddNotificationHandler) -- CLIENT addEvent("CaddNotification", true) function troller( text, red, green, blue ) addNotification( text, red, green, blue ) end addEventHandler("CaddNotification", root, troller ) ERROR: Server triggered clientside event but event is not added client side.
  8. ERROR: Troll-Login\server.lua:17: attempt to concatenate field '?' (a nil value)
  9. ERROR: Troll-Login\server.lua:17: attempt to concatenate local 'v' (a table value)
  10. ERROR: Troll-Login\server.lua:17: attempt to concatenate local 'v' (a table value)
  11. Wei

    help again

    Copy the code again
  12. Wei

    help again

    Server. It works for me
  13. Wei

    help again

    Try again i've fix it
  14. Wei

    help again

    local x, y, z = 1361.099609375, -1658.7998046875, 12.39999961853 fixmark = createMarker ( x, y, z, "cylinder", 3, 0, 255, 0, 255 ) function fixveh ( hitElement) if getElementType(hitElement) == "vehicle" then local thePlayer= getVehicleOccupant(hitElement) local money = getPlayerMoney ( thePlayer ) if (money) >= 5000 then fixVehicle ( hitElement) takePlayerMoney ( thePlayer, 5000 ) end end end addEventHandler ( "onMarkerHit", fixmark, fixveh )
  15. Wei

    [HELP] wanted

    function checkWanted () if getElementData(localPlayer, "wantedLevel") then if (tonumber(getElementData(localPlayer, "wantedLevel")) < 0) then setElementData(localPlayer, "wantedLevel",0.0) end end end setTimer(checkWanted,30000,0) function lowerWanted () if getElementData(localPlayer, "wantedLevel") then if (tonumber(getElementData(localPlayer, "wantedLevel")) > 0) then setElementData(localPlayer, "wantedLevel", getElementData(localPlayer, "wantedLevel")-0.5) end end end setTimer(lowerWanted,60000,0) -- SERVER function show_wanted_level(player) if getElementData( player, "wantedLevel") then if getElementData( player, "wantedLevel") == 0.0 then outputChatBox ( "Your wantedlevel is " .. getElementData( player, "wantedLevel"), player, 0, 200, 0 ) else outputChatBox ( "Your wantedlevel is " .. getElementData( player, "wantedLevel"), player, 200, 0, 0 ) end end end addCommandHandler("wl", show_wanted_level) You must check if the ElementData "wantedLevel" even exsist.
  16. Wei

    help

    You're welcome P.S. SKIPPER you script can not work because secund parameter is seat not the vehicle. OnVehicleExit
  17. https://wiki.multitheftauto.com/wiki/Resource:Race You have onPlayerPickUpRacePickup parameters somewhere at the botom And the second parameter is PickupType so check it with script if the type is "vehiclechange".
  18. Wei

    help

    function giveMoney(thePlayer) local id = getElementModel(source) if id == 431 or 437 then local gpm = getElementData(thePlayer, "buszp") if ((gpm) > 0 ) then givePlayerMoney(thePlayer, tonumber(gpm)) outputChatBox("Ai castigat " .. gpm .. "$", thePlayer, 0, 140, 240) setElementData(thePlayer, "buszp", 0) end end end addEventHandler("onVehicleExit", rootElement, giveMoney)
  19. local checkSave = dbQuery( test_db, "SELECT * FROM accounts WHERE serial=?", getPlayerSerial(source) ) local result = dbPoll( checkSave, -1 ) outputChatBox(result[5]) Why does this return nil ?
  20. Ty making column instead of numbers for ColumnIndex
×
×
  • Create New...