MitnickP56

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MitnickP56

  • Rank
    Rat

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes. I'm tried now to change source-> theplayer and nothing. I have no idea how the fix it.
  2. Hi. I'm trying to create script which doing outputChatBox when GUY from name/serial will say smth on chat box. My code: serialhaza = { ["2B2BEE3C8B7C95BA25F714E7867557F2"] = true } function nahaza(thePlayer) local hazik = string.find(getPlayerName(thePlayer), "Haze", 1, true) if hazik or serialhaza[getPlayerSerial(thePlayer)]then outputChatBox("haz ciapaty pedal",thePlayer) end end addEventHandler("onPlayerChat",root,nahaza)
  3. Hi. I'm trying to do script while which block control HORN from other keys than ( H // CAPSLOCK) Code server: function klakson (source) if (isKeyBound (source,"capslock")) or (isKeyBound (source,"h")) then setControlState (source, "horn", true ) outputChatBox ("on",getRootElement(),255,0,0,true) -- only information else toggleControl ( "horn", false ) outputChatBox (source,"off",getRootElement(),255,0,0,true) -- only information end end addEventHandler ("onClientResourceStart",getRootElement(),klakson) Any ideas? ;/
  4. Rly thanks. working One more question. How I can add here blowVehicle? after setElementPosition.
  5. Hi. It's my code : function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then setElementPosition ( v, 200, 150, 15 ) end end end bindKey("enter","down",warent) Idk why not working. Scripts is without debug. 0 errors.
  6. Hi. I have problem with healthbar (my edit) original: https://community.multitheftauto.com/in ... ls&id=9135 All can see on the picture. In random healthbar 0% and in this script 22% http://iv.pl/images/65963762101610373676.png Code: local screenW,screenH = guiGetScreenSize() local resW,resH = 1280,720 local sW,sH = (screenW/resW), (screenH/resH) function drawVehicleHUD() local vehicle = getPedOccupiedVehicle( getLocalPlayer() ) if ( vehicle ) then --local speedX, speedY, speedZ = getElementVelocity ( vehicle ) --local actualSpeed = (speedX^2 + speedY^2 + speedZ^2)^(0.5) --local KMH = math.floor(actualSpeed*180) if ( getElementHealth( vehicle ) >= 1000 ) then vehiclehealth = 100 else vehiclehealth = math.floor(getElementHealth ( vehicle )/10) end dxDrawRectangle(1079*sW, 578*sH, 191*sW, 17*sH, tocolor(0, 0, 0, 180), true) dxDrawRectangle(1084*sW, 583*sH, 181*sW, 17*sH, tocolor(0, 0, 0, 80), true) dxDrawRectangle(1084*sW, 583*sH, 181*sW/100*vehiclehealth, 10*sH, tocolor(8, 252, 104, 255), true) --dxDrawText("HEALTH", 1084*sW, 683*sH, 1265*sW, 700*sH, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) --dxDrawRectangle(1079*sW, 646*sH, 191*sW, 27*sH, tocolor(0, 0, 0, 180), true) --dxDrawText(KMH.." KM/H", 1084*sW, 651*sH, 1265*sW, 668*sH, tocolor(255, 255, 255, 255), 1.15, "default-bold", "center", "center", false, false, true, false, false) dxDrawText(vehiclehealth.."%", 1203*sW, 1020*sH, 1260*sW, 270*sH, tocolor(0, 255, 0, 255), 1.00, "default-bold", "center", "center", false, false, true, true, false) end end addEventHandler("onClientRender", root, drawVehicleHUD) Please help.
  7. Yup look, If player say troll then -- he's outputChatBox( Troll ) - sv message he's messagee and sv message
  8. Hi. I don't know how to make it. I wanna create script when someone say in chat: 1.Someone said troll 2. outputchatbox from sv: -- troll -- (next line after someone tell this 'troll') Idk how do it, onPlayerChat . Please help troll -> information (outputChatBox("#ffffffTroll",255,255,255,true)
  9. Hi, I tried to make fps checker. smth like Nick his fps = (fps) . but with fps<=35 I wanna change 10.0001 to 10 Nick fps; 30.00333 -> Nick fps: 30 with timer 1 sec Code: local fps = false function getCurrentFPS() -- Setup the useful function return fps end setTimer(getCurrentFPS, 1000, 0) local function updateFPS(msSinceLastFrame) -- FPS are the frames per second, so count the frames rendered per milisecond using frame delta time and then convert that to frames per second. fps = (1 / msSinceLastFrame) * 1000 for _, v in ipairs(getElementsByType("player")) do local state = getElementData (v, "state") if state == "alive" then local pokazfps = getCurrentFPS() if (pokazfps <= 35) then outputChatBox(getPlayerName(v).." #fffffffps"..pokazfps, 213, 255, 255, true) end end end end addEventHandler("onClientPreRender", root, updateFPS) This code show:
  10. Hi I have code for alias player, When I type /pma -- doesn't work. addEventHandler("onResourceStart", resourceRoot, function() executeSQLQuery("CREATE TABLE IF NOT EXISTS `players` (`serial` TEXT, `mute` TEXT, `alias` TEXT)") end ) addEventHandler("onPlayerJoin", root, function() local serial = getPlayerSerial(source) local name = getPlayerName(source) local r = executeSQLQuery("SELECT `mute`,`alias` FROM `players` WHERE `serial`=?", serial) if #r == 0 then executeSQLQuery("INSERT INTO `players` (`serial`,`mute`,`alias`) VALUES(?,?,?)", serial, "no", name) else if r[1]["mute"] == "yes" then setPlayerMuted(source, true) outputChatBox(name:gsub("#%x%x%x%x%x%x", "").." has been muted by Console!", root, 255, 0, 0, true) end end end ) addEventHandler("onPlayerQuit", root, function() if isPlayerMuted(source) then else end end ) addEventHandler("onPlayerJoin", root, function() setAlias(source) end ) addEventHandler("onPlayerChangeNick", root, function() setTimer(setAlias, 100, 1, source) end ) function setAlias(source) local find = true local name = getPlayerName(source) local serial = getPlayerSerial(source) local r = executeSQLQuery("SELECT `mute`,`alias` FROM `players` WHERE `serial`=?", serial) for i,v in ipairs(split(r[1]['alias'], 32)) do if v == name then find = false end end if find then executeSQLQuery("UPDATE `players` SET `mute`=?, `alias`=? WHERE `serial`=?", r[1]["mute"], r[1]["alias"].." "..name, serial) end end function findPlayer(name) if name then for i, player in ipairs(getElementsByType("player")) do if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then return player end end end return false end local alias1 = "" local alias2 = 0 addCommandHandler("pma", function(p, _, t) local target = findPlayer(t) if target then local serial = getPlayerSerial(target) local r = executeSQLQuery("SELECT `mute`,`alias` FROM `players` WHERE `serial`=?", serial) local spl = split(r[1]["alias"], 32) for i, v in ipairs(spl) do if alias1 == "" then alias1 = v alias2 = alias2 + 1 else alias1 = alias1..", "..v alias2 = alias2 + 1 end if i == #spl then outputChatBox(alias1, p, 255, 255, 255, true) alias1 = "" alias2 = 0 end end end end ) Debugscript;