Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. Hi, i ran into a problem. local playerTimer = {} playerTimer[source] = setTimer(function() outputChatBox("Player "..getPlayerName(source).." has been unmuted.", root, 255, 0, 0) -- LINE 14 setMuted(source, false) end, duration*60000, 1) DEBUG: sourceS line 14 - Bad argument @ 'getPlayerName' [Expected element at argument 1, got nil] sourceS line 14 - attempt to concatenate a boolean value What's the problem?
  2. Hi! I'm working on a cinema script, everything fine, but i don't know how to calculate the volume by distance. Anybody can help me please? local cinemax, cinemay, cinemaz = 0, 0, 0 local x, y, z = getElementPosition(localPlayer) local dis = getDistanceBetweenPoints3D(x, y, z, cinemax, cinemay, cinemaz) local volume = dis/2 -- Idk what to use setBrowserVolume(Screen,volume)
  3. https://community.multitheftauto.com/index.php?p=resources&s=details&id=12699
  4. You should use onPlayerQuit then use if isElement(vas1) then destroyElements(vas1) and addEventHandler("onResourceStart", resourceRootElement(getThisResource()), function() vas1 = createObject ( 3529, -2112.55103, -249.87376, 35.32031, 0, 0, 0 ) end)
  5. Hi, is there any way to set the texts to center when using guiCreateMemo ?
  6. as i said, i just want to hide this "scrolling bar"
  7. with guiSetAlpha it's changing the panel too, i just want to hide that scroll thing.
  8. Hi, is there any way to just hide this "scrolling" thing ?
  9. itHyperoX

    code ?

    but for position saving you can use setAccountData(account, "WWRPG.POS", toJSON({x, y, z})) --then use it local accData = getAccountData(account, "WWRPG.POS") local playerX, playerY, playerZ = unpack(fromJSON(accData))
  10. if you want to create an object under player, yes you can x , y , z , you need to calculate the Z value
  11. cuz setBlurLevel not working. Use https://wiki.multitheftauto.com/wiki/SetPlayerBlurLevel
  12. local sec = 30 -- < you can always change this. just put the second here local sec_ = sec*1000 setTimer(function() removeEventHandler("onClientRender",getRootElement(),helpe) end, sec_ , 1)
  13. Hi, is there any way to set the guiCreateGridList background to 0 ? I know there is a guiSetProperty, can anybody help me with that?
  14. you should check this out: https://github.com/Dante383/custom-weapons
  15. itHyperoX

    help

    object = createObject(1337, 0, 0, 0) local x, y, z = getElementPosition(object) setObjectRotation(object, x, y, z) but you can use setElementRotation too.
  16. Hi! I'm still learning mysql , and i started writing a vehicle system script. I stuck... I want to get that, is any vehicle already on that slot. How can i get that? I tried like 20 way, but just failed. I want something like this: I want to get is the player have vehicle on their Slot 1.. If yes, returning false. local result = (mysql:singleQuery("SELECT Slot=1 FROM vehicles WHERE VehicleOwnerAccountID=?", getElementData(source, "Player:AccountID"))) if tonumber(result) == 0 then local inserVehicle = mysql:execute("INSERT INTO vehicles (VehicleOwnerAccountID, Slot , VehicleID, Color, Plate, Spawned) VALUES (?, ?, ?, ?, ?, ?)", getElementData(source, "Player:AccountID"), 1, 411, 0, 0, 0) outputChatBox("ID:"..inserVehicle.VehicleDBID) mysql:singleQuery("UPDATE `accounts` SET `VehiclePerPlayerCount`=? WHERE `AccountID`=?", SlotQuery.VehiclePerPlayerCount + 1, getElementData(source, "Player:AccountID")) outputChatBox("Vehicle successfully inserted.", source) else outputChatBox("slot.") outputChatBox(tostring(result)) end
  17. I'm sure this is not your code. If you don't know what you can use on server / client side, you can not make a moving spoiler script :).
  18. itHyperoX

    Help please

    local mycrpmpartner = {} function thePM(thePlayer,commandName,sendToName,...) local pmWords = { ... } local pmMessage = table.concat( pmWords, " " ) if sendToName then if getPlayerFromNamePart2(sendToName) then local toPlayer = getPlayerFromNamePart2(sendToName) if not (toPlayer == thePlayer) then --that () needed if getElementData(toPlayer, "Player:PMState") == true then outputChatBox("This player blocked the privat messages.", thePlayer) end if not (pmMessage == "") then outputChatBox("#757575[PM] Message to #ff00ff" .. getPlayerName(toPlayer) .. ":#ffffff " .. pmMessage, thePlayer, 255, 255, 255, true) outputChatBox("#FF0000[PM] Message from #ffFFff" .. getPlayerName(thePlayer) .. ":#ffff00 " .. pmMessage, toPlayer, 255, 255, 255, true) mycrpmpartner[thePlayer]=toPlayer mycrpmpartner[toPlayer]=thePlayer else outputChatBox("#FF0000[PM]Use:#ff9900 /pm [part of name] [message]", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF000[PM] You cannot PM yourself #ff9900!", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF0000[PM] Player not found! #FFFF00[#ff9900"..sendToName.."#FFFF00]", thePlayer, 255, 255, 255, true) end else outputChatBox("#FF0000[PM]Use:#ff9900 /pm [part of name] [message]", thePlayer, 255, 255, 255, true) end end addCommandHandler("pm", thePM) function getPlayerFromNamePart2 ( name ) if ( name ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do local name_ = getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ):lower ( ) if name_:find ( tostring ( name ):lower ( ), 1, true ) then return player end end end end addCommandHandler("blockpm", function(source) local PMState = getElementData(source, "Player:PMState") if (PMState == false) then setElementData(source, "Player:PMState", true) else setElementData(source, "Player:PMState", false) end end )
  19. This is not your script.
×
×
  • Create New...