Resto

Members
  • Content count

    155
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Resto

  • Rank
    Busta

Details

  • Gang
    KILLERS
  1. UnconvertNumber()

    oh sorry. i fixed. But thanks.
  2. Help please

    Thanks. Working.
  3. UnconvertNumber()

    What is wrong with this code? Can anyone please tell me what is wrong? I need from x,xxx,xxx to xxxxxxx. function unconvertNumber(number) local result = number:gsub(',', ''); return tonumber(result); end
  4. Help please

    Sorry. So i need clear table when player quit?
  5. Help please

    but doesnt work..
  6. Help please

    wat?
  7. Help please

    Doesnt work and your setElementData in blockpm ? wat
  8. Help please

    Really thanks for your help but i need functions or example /blockpm <player> not for all players
  9. Help please

    Helo all, can anyone tell me what functions i need for /blockpm <name> i used this PM system. 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 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
  10. how to disable warping

    4 YEARS
  11. triggerClientEvent

    i fixed. so thx all for help.
  12. triggerClientEvent

    Now its working only for one sec and i need always render when i join col. CLIENT-SIDE: local screenW, screenH = guiGetScreenSize() function addRenderHP(nemesis) if exports.extra_health:isElementWithExtraHealth(nemesis) then addEventHandler("onClientRender", getRootElement(), addRenderHP) dxDrawText("Nemesis Health: "..exports.extra_health:getElementExtraHealth(nemesis) .."", (screenW * 0.0000) + 1, (screenH * 0.1283) + 1, (screenW * 0.9988) + 1, (screenH * 0.1700) + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Nemesis Health: "..exports.extra_health:getElementExtraHealth(nemesis) .."", screenW * 0.0000, screenH * 0.1283, screenW * 0.9988, screenH * 0.1700, tocolor(12, 254, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) end end addEvent("addRenderHP", true) addEventHandler("addRenderHP", getRootElement(), addRenderHP) function RemoveRenderHP() removeEventHandler("onClientRender", getRootElement(), addRenderHP) end addEvent("RemoveRenderHP", true) addEventHandler("RemoveRenderHP", getRootElement(), RemoveRenderHP) SERVER-SIDE: nemesis = exports["slothbot"]:spawnBot(-2337.544921875, -1618.7431640625, 483.71304321289, 0, 12, 0, 0, nil, 0, "hunting", true) exports.extra_health:setElementExtraHealth(nemesis, 10000) addEventHandler("onColShapeHit", Area, function(source) if getElementType(source) == "player" then triggerClientEvent(source, "addRenderHP", getRootElement(), nemesis) end end)
  13. triggerClientEvent

    nothing. error or warning its not problem.. my question how i can export extra_health from server-side to client-side
  14. triggerClientEvent

    Any help?
  15. triggerClientEvent

    SERVER-SIDE: local Area = createColRectangle(-2374.2119140625, -1694.4833984375, 130, 150) addEventHandler("onColShapeHit", Area, function(source) if getElementType(source) == "player" then nemesishealth = exports.extra_health:getElementExtraHealth(nemesis) triggerClientEvent(source, "addRenderHP", getRootElement(), nemesishealth) end end) addEventHandler("onColShapeLeave", Area, function(source) if getElementType(source) == "player" then triggerClientEvent(source, "RemoveRenderHP", getRootElement()) end end) CLIENT-SIDE: local screenW, screenH = guiGetScreenSize() function renderHP(nemesis) dxDrawText("Nemesis Health: "..exports.extra_health:getElementExtraHealth(nemesis).."", (screenW * 0.0000) + 1, (screenH * 0.1283) + 1, (screenW * 0.9988) + 1, (screenH * 0.1700) + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Nemesis Health: "..exports.extra_health:getElementExtraHealth(nemesis).."", screenW * 0.0000, screenH * 0.1283, screenW * 0.9988, screenH * 0.1700, tocolor(12, 254, 0, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) end function addRenderHP () addEventHandler("onClientRender", getRootElement(), renderHP) end addEvent("addRenderHP", true) addEventHandler("addRenderHP", getRootElement(), addRenderHP) function RemoveRenderHP() removeEventHandler("onClientRender", getRootElement(), renderHP) end addEvent("RemoveRenderHP", true) addEventHandler("RemoveRenderHP", getRootElement(), RemoveRenderHP) Can anyone help me with this? i don't know how to export nemesis health in client-side.