-
Posts
814 -
Joined
-
Last visited
Everything posted by Wei
-
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)
-
function antOfensa () x = string.gsub("bitch", "bitch","I Love You") --string.gsub(text, selectedWord, wordToReplace) --> x="I Love You" end
-
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....
-
http://lmgtfy.com/?q=zombie+skins+gta+san+andreas
-
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
-
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.
-
-- 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.
-
ERROR: Troll-Login\server.lua:17: attempt to concatenate field '?' (a nil value)
-
ERROR: Troll-Login\server.lua:17: attempt to concatenate local 'v' (a table value)
-
ERROR: Troll-Login\server.lua:17: attempt to concatenate local 'v' (a table value)
-
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 )
-
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.
-
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".
-
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)
-
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 ?
-
Ty making column instead of numbers for ColumnIndex