Jump to content

fmj02

Members
  • Posts

    130
  • Joined

  • Last visited

Details

  • Location
    Poland

Recent Profile Visitors

1,806 profile views

fmj02's Achievements

Poot-butt

Poot-butt (14/54)

1

Reputation

  1. fmj02

    Unban request

    I got banned globally(master server) on serial. I admit I hacked(used my own little hack to test how good anti cheat is xD, injected my own Lua script through hooking some calls... well, it worked for a while). Could I ask for unbanning? I regret.. it won't happen again. Your anti cheat is beast Serial: 15AA4B3B92F1332AFB4F5C84E79D2752 Best regards
  2. Display name changing option is missing, it was available before. Would be nice to see it again under "Edit profile".
  3. viewtopic.php?f=140&t=38462&hilit=scene2res
  4. Skrypt jest zakładam server-side, więc w pliku określającym zasób wiesz co masz robić. Druga sprawa: callback onPlayerChat przyjmuje dwa parametry nimi są: message, messageType. W systemie zdarzeń MTA istnieje coś takiego jak source czyli podmiot do którego jest dane zdarzenie przypisane. Zamień więc sobie: local function czat (message, thePlayer) na local function czat (message, messageType) oraz wszystkie thePlayer na source, no i tyle. Co do specyfikatora local to nie wiem czy on jest szybszy, parser interpretuje kod podobnie, taka różnica, że local jest dostępny tylko w danym zakresie, a global "wszędzie". Moim zdaniem to też możesz wyjebać. Also czytaj wiki, jak coś nie działa to kod jest po prostu nie zjebany ale źle napisany. https://wiki.multitheftauto.com/wiki/OnPlayerChat EDIT: jeszcze błąd skrawkiem oka zobaczyłem: elseif (money<=price) then Nie pozwalasz kupić przedmiotu gdy twój stan pieniędzy jest niższy lub równy cenie towaru. Problem w słowie równy, skoro twoja kasa jest równa cenie czyli cie na to stać więc zamień <= na < chociaż to i tak nie istotne bo sprawdzasz czy jest równy w pierwszym warunku ale to tak tylko pisze. btw. zorientowałem sie, że odkopałem w chuj stary temat , ale przynajmniej problem solved.
  5. http://www.gtamodding.com/index.php?tit ... t_Adjuster
  6. Use your minutes variable, for this reason it's created... isn't it? [...] local minutes = math.floor(time * 60 * 1000) outputChatBox(getPlayerName(target).." has been muted for "..tostring(((minutes/1000)/60)).." minutes ("..reason..") .", root,255, 0, 0) setPlayerMuted(target, true) setTimer(setPlayerMuted, minutes, 1, target, false) [...] Best regards.
  7. So in this case you should consider using OnClientResourceStart
  8. He will be muted for ever because there's no timer in your code executing function which is responsible for unmute, outputChatBox displays 24 minutes because variable minutes contains this value. Currently it works like that: 4*60*1000 so minutes is equal to 240000 right now - your 4 minutes in milliseconds, so if you want to display it as minutes you've got to divide it by 1000 and then by 60. outputChatBox(getPlayerName(target).." has been muted for "..tostring(((minutes/1000)/60))).." minutes ("..reason..") .", root,255, 0, 0) Except this you should use setTimer to actually get it working. setTimer
  9. STRING datatype doesn't exist in SQLite, consider using TEXT instead of it. http://www.sqlite.org/datatype3.html Best regards.
  10. Your code isn't working properly because of two things: 1. You can't call the functions just when you specify arguments of some function(tostring in this case). 2. local variables are accessible only "before first end" after if statement they're not visible anymore so when you try to use them UH OH code doesn't work. so all you have is to remove local keywords and tostring from the arguments instead of using it there use it inside. function callphonenumber(thePlayer, cmd, phonenumber2, ...) if phonenumber2 then phonenumber2 = tostring(phonenumber2) -- PHONENUMBER2 if (phonenumber2 == "222222222") then player2 = getPlayerFromName("Ervin_Balog") elseif (phonenumber2 == "755167267") then player2 = getPlayerFromName("Alex_James") elseif (phonenumber2 == "752786786") then player2 = getPlayerFromName("John_Skot") elseif (phonenumber2 == "756842354") then player2 = getPlayerFromName("Bohumil_Jentky") end -- PHONENUMBER1 if (getPlayerName(thePlayer) == "Ervin_Balog") then phonenumber1 = "222222222" elseif (getPlayerName(thePlayer) == "Alex_James") then phonenumber1 = "755167267" elseif (getPlayerName(thePlayer) == "John_Skot") then phonenumber1 = "752786786" elseif (getPlayerName(thePlayer) == "Bohumil_Jentky") then phonenumber1 = "756842354" end if player2 and phonenumber1 then local msg = table.concat({...}, " ") if (msg and msg ~= "") then outputChatBox("[PHONE-"..phonenumber1.."]: ".. msg .." ",player2,255,150,30,true) outputChatBox("Message has been sent.",thePlayer,255,150,30,true) end end end end addCommandHandler("phone",callphonenumber) Try to test code below to understand it better: console outputs nil function test(a) if a then local myLocal = 5 end print(myLocal) end test(1) Best regards
  11. That's fantastic! I can give you code for sex I made long time ago for my rp server needs, but it's really easy to make though. That would be a good script for communities, imagine that in this camera view. I want to see more.
  12. You will have to remove auto-respawn to make it working, otherwise the team will be always alive(if the server has players) function AreSurvivorsGone() local t = {} for _, v in ipairs(getPlayersInTeam(teamSurvivor)) do if isPedDead(v) then table.insert(t, v) end end if #t == getPlayersInTeam(teamSurvivor) then return true end return false end addEventHandler("onPlayerWasted", root, function() if AreSurvivorsGone() then -- function for changing the map end end )
  13. You haven't even set zombie team, why do you expect it to work? Now when you die, you are zombie and after 5 seconds you get spawned with the knife and new skin. If it doesn't work just check error logs, I just modified few lines. local aa_root = getRootElement() teamSurvivor = createTeam ( "Humans", 0, 255, 0 ) teamZombies = createTeam ( "Zombies", 255, 0, 0 ) function loadmap(startmap, player) mapRoot = getResourceRootElement(startmap) local plrs = getElementsByType( "player" ); for i, plr in pairs( plrs ) do setElementData( plr, "Deaths", 0 ) -- ////////////////// MISION \\\\\\\\\\\\\\\\\\ local total_markers = getElementChildrenCount( getElementByID( "markers" ) ) local num = math.random( 0, total_markers - 1 ) local marker_spawn = getElementChild ( getElementByID( "markers" ), num) local mx = getElementData ( marker_spawn, "posX" ) local my = getElementData ( marker_spawn, "posY" ) local mz = getElementData ( marker_spawn, "posZ" ) setPlayerTeam ( plr, teamSurvivor ) objectiveMarker = createMarker(mx, my, mz) -- ///////////////// SPAWN \\\\\\\\\\\\\\\\\\\\ local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setTimer( setPedSkin , 500 , 1 , plr, math.random(9,288)) spawnPlayer( plr, x, y, z, rot); setCameraTarget ( plr, plr ); fadeCamera( plr, true ); for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do giveWeapon( plr, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end end end addEventHandler("onGamemodeMapStart", aa_root, loadmap) function aa_onResourceStart( resourcename, res ) setTeamFriendlyFire(teamSurvivor , false ) if ( resourcename == getThisResource () ) then local plrs = getElementsByType( "player" ); for i, plr in pairs( plrs ) do setElementData( plr, "Deaths", 0 ) end setTimer( call, 1000, 1, getResourceFromName("scoreboard"), "addScoreboardColumn", "Deaths" ) end if resourceName == 'mapmanager' then mapmanager = createResourceCallInterface('mapmanager') end end addEventHandler( "onResourceStart", aa_root, aa_onResourceStart ) function joinHandler() local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setElementData( source, "inmarker", false ); setPlayerTeam ( source, teamSurvivor ) spawnPlayer( source, x, y, z, rot ) setTimer( setPedSkin , 500 , 1 , source, math.random(9,288)) outputChatBox("< Welcome To Against All By CHAOS_IS_ME>", source, 255, 138, 0, true) outputChatBox("< Current Version: #00FF00 1.0>", source, 255, 138, 0, true) setCameraTarget ( source, source ) setElementData( source, "Deaths", 0 ) fadeCamera(source, true) for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do giveWeapon( source, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end end addEventHandler("onPlayerJoin", aa_root, joinHandler) function aa_playerWasted( totalAmmo, killer ) local playerdeaths = getElementData ( source, "Deaths" ) setElementData ( source, "Deaths", playerdeaths+1 ) local total_spawns = getElementChildrenCount( getElementByID( "spawns" ) ) local num = math.random( 0, total_spawns - 1 ) local skin = math.random(9,288) local spawn_random = getElementChild ( getElementByID( "spawns" ), num ) local x = getElementData ( spawn_random, "posX" ) local y = getElementData ( spawn_random, "posY" ) local z = getElementData ( spawn_random, "posZ" ) local rot = getElementData ( spawn_random, "rot" ) setPlayerTeam ( source, teamZombies ) setTimer( spawnPlayer , 5000 , 1 , source, x, y, z, rot) setCameraTarget ( source, source ) fadeCamera(source, true) --[[ idk what the fuck is dat for k,v in ipairs( getElementChildren( getElementByID( "armas" ) ) ) do setTimer( giveWeapon, 5000 , 1 , source, tonumber( getElementData( v, "id" ) ), getElementData( v, "ammo" ) ) end]] end addEventHandler ( "onPlayerWasted", aa_root, aa_playerWasted ) local localPlayerName = getPlayerName(aa_root) -- misiones function MarkerHit1 ( hitPlayer, matchingDimension ) local plrs = getElementsByType( "player" ); for i, plr in pairs( plrs ) do WinDisplay = textCreateDisplay () setTimer( textDisplayAddText, 800, 1, WinDisplay, WinText ) -- textDisplayAddText ( WinDisplay, WinText ) WinText = textCreateTextItem ( getPlayerName(hitPlayer) .. " WIN! Next Map In 10 Seconds", 0.5, 0.5, "low", 255, 0, 0, 255, 2, "center" ) textDisplayAddObserver ( WinDisplay, plr) setElementData( hitPlayer, "inmarker", true ) setTimer( textDestroyTextItem, 5000, 1, WinText ) setTimer(StartNextMap,10000,1) setPedFrozen ( aa_root, true ) setTimer( setElementFrozen, 10000, 1, aa_root, false ) end end addEventHandler("onMarkerHit", aa_root, MarkerHit1) function StartNextMap () exports.mapmanager:changeGamemode( getResourceFromName('aa') ) end infection = createPickup (-1, 1, 3.11, 3, 1275, 15000 ) function infected ( thePlayer ) setPlayerTeam ( thePlayer, teamZombies ) setPedSkin ( thePlayer, 13 ) setPedHeadless ( thePlayer, true ) end addEventHandler ( "onPickupUse", infection, infected ) addEventHandler("onPlayerSpawn", root, function() if(getPlayerTeam(source) == teamZombies) then local weaponsToGive = { { id = 4, ammo = 30, setAsCurrent = true }, -- your knife } for _, v in ipairs(weaponsToGive) do giveWeapon(source, v.id, v.ammo, v.setAsCurrent) end setElementModel(source, 137) setPedHeadless ( source, true ) outputChatBox ( "You are now a Zombie.", source, 255, 0, 0 ) end end )
  14. It works 100%, you had to make something wrong. Please upload somewhere your code because it's too big to post it here.
  15. Maybe you have a resource with the same event turned on.. like freeroam? According to this example it should work well.
×
×
  • Create New...