Jump to content

TwiX!

Members
  • Posts

    905
  • Joined

  • Last visited

Everything posted by TwiX!

  1. TwiX!

    Need a Function

    What did he "steal" from your server? he just asked what function was used to draw the rectangle. rofl I think to you it will not be pleasant if guys will copy your ideas on the server
  2. TwiX!

    Help plzzz

    check your code there not have screenHeight
  3. TwiX!

    Need a Function

    tapl please ban this guy and close this topic it's stoled from wtf server from my panel
  4. самп убожество юзай идею mx_master'a
  5. TwiX!

    Neon Script

    why you need attach new neons when player got checkpoint or pickup? use onNotifyPlayerReady event( if you use race) local vehicles = { [ 415 ] = true, [ 411 ] = true, [ 549 ] = true } function neons () local account = getPlayerAccount(source) if not account then return end if getAccountData (account,"haveNeons") == true or 1 then local theVehicle = getPedOccupiedVehicle ( source ) if theVehicle then local x, y, z = getElementPosition ( theVehicle ) if not x or not y or not z then return end local id = getElementModel ( theVehicle ) if ( vehicles [ id ] ) then local neon = createObject ( 14403, x, y, z ) local neon1 = createObject ( 14403, x, y, z ) if ( id == 415 ) then attachElements ( neon1, theVehicle or source, 1, 0, -0.5 ) attachElements ( neon, theVehicle or source, -1, 0, -0.5 ) elseif ( id == 411 ) then attachElements ( neon1, theVehicle or source, 1.05, 0, -0.55 ) attachElements ( neon, theVehicle or source, -1.05, 0, -0.55 ) elseif ( id == 549 ) then attachElements ( neon1, theVehicle or source, 1, 0, -0.4 ) attachElements ( neon, theVehicle or source, -1, 0, -0.4 ) end end end end end addEventHandler("onNotifyPlayerReady",getRootElement(),neons) addEventHandler ( "onPlayerPickUpRacePickup", getRootElement(), neons ) addEventHandler ( "onPlayerReachCheckpoint", getRootElement(), neons ) later detach and destroyElement mm.. "onPlayerWasted" and as i know object 14403 it's element of library rofl
  6. TwiX!

    Neon Script

    https://wiki.multitheftauto.com/wiki/SetAccountData https://wiki.multitheftauto.com/wiki/GetAccountData function neons ( thePlayer ) local account = getPlayerAccount(source) if getAccountData (account,"haveNeons") == true or 1 then local x, y, z = getElementPosition ( source ) local id = getElementModel ( source ) if ( getPlayerName ( thePlayer ):find ( "AS|" ) ) then if ( vehicles [ id ] ) then local neon = createObject ( 14403, x, y, z ) local neon1 = createObject ( 14403, x, y, z ) if ( id == 415 ) then attachElements ( neon1, source, 1, 0, -0.5 ) attachElements ( neon, source, -1, 0, -0.5 ) elseif ( id == 411 ) then attachElements ( neon1, source, 1.05, 0, -0.55 ) attachElements ( neon, source, -1.05, 0, -0.55 ) elseif ( id == 549 ) then attachElements ( neon1, source, 1, 0, -0.4 ) attachElements ( neon, source, -1, 0, -0.4 ) end end end end end addEventHandler ( "onVehicleEnter", getRootElement(), neons ) addEventHandler ( "onPlayerPickUpRacePickup", getRootElement(), neons ) addEventHandler ( "onPlayerReachCheckpoint", getRootElement(), neons ) Server-Side only Ofc you need set account data "haveNeons"
  7. it was your code, you changed it @if i will hotfix your code, you will never understand(learn) lua @will ctrl+c,ctrl+v
  8. createBlipAttachedTo https://wiki.multitheftauto.com/wiki/Cre ... AttachedTo createBlipAttachedTo ( theDestination, 0, 3, 0, 0, 255, 255, 0, 99999, thePlayer ) too much big size(distance) Coz you make marker ONE time (when the player started working/when reousrce start)
  9. put your code here main_s.lua line 85 (with all function) same for main_s.lua 1003
  10. TwiX!

    freecam for race

    check it with outputDebugString
  11. TwiX!

    freecam for race

    put here /debugscript 3
  12. TwiX!

    send money

    you're welcome
  13. in your code all players can use 429 vehicle you need 1)create team 2)set player to team 3)set team in to the account 4)then get account data(player),trigger event with his team 5)if his team == police(as example) unlock vehicle,esle lock
  14. bool spawnPlayer ( player thePlayer, float x, float y, float z, [ int rotation = 0, int skinID = 0, int interior = 0, int dimension = 0, team theTeam = nil ] )
  15. я не думаю что кто-то будет проверять столь большой код значит когда ты выходишь из интерьера ставится пикапам другой интерьер, ищи где то этот код
  16. AMARANT tell it to NooP i know that. source in "onMarketHit" it's the marker in NooP code. He compares the player with the marker, it is wrong
  17. if it's client so function outputPOS () local x, y, z = tonumber(getElementPosition( localPlayer )) local car = getPedOccupiedVehicle( localPlayer ) local cx, cy, cz = tonumber(getElementPosition( car )) local file = fileOpen("positiondump.txt") if not file then file = fileCreate("positiondump.txt") outputDebugString("Creating positiondump.txt") end if file then if (car) then fileSetPos(file,fileGetSize(file)) local written = fileWrite( file, cx .. ", " .. cy .. ", " .. cz,"\r\n----------\r\n") fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved your car's position!") outputChatBox(valuetype) end else fileSetPos(file,fileGetSize(file)) local written = fileWrite( file, x .. ", " .. y .. ", " .. z,"\r\n----------\r\n") fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved your position!") outputChatBox(valuetype) end end else outputDebugString("ERROR: Cannot find or create positiondump.txt") end end addCommandHandler("pos" ,outputPOS) if server-side function outputPOS (playerSource) local x, y, z = tonumber(getElementPosition( playerSource )) local car = getPedOccupiedVehicle( playerSource ) local cx, cy, cz = tonumber(getElementPosition( car )) local file = fileOpen("positiondump.txt") if not file then file = fileCreate("positiondump.txt") outputDebugString("Creating positiondump.txt") end if file then if (car) then fileSetPos(file,fileGetSize(file)) local written = fileWrite( file, cx .. ", " .. cy .. ", " .. cz,"\r\n----------\r\n") fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved your car's position!",playerSource) outputChatBox(valuetype,playerSource) end else fileSetPos(file,fileGetSize(file)) local written = fileWrite( file, x .. ", " .. y .. ", " .. z,"\r\n----------\r\n") fileFlush(file) fileClose(file) if written then outputChatBox("Succesfully saved your position!",playerSource) outputChatBox(valuetype,playerSource) end end else outputDebugString("ERROR: Cannot find or create positiondump.txt") end end addCommandHandler("pos" ,outputPOS)
  18. function loadResource ( ) theEntrance = createMarker ( 1481.0408935547, -1771.6051513672, 18.795755386353+1, "arrow", 1.5, 0, 255, 0, 170 ) theExit = createMarker ( 389.8681640625, 173.9693145752, 1008.3828125+1, "arrow", 1.5, 0, 255, 0, 170 ) estateBlip = createBlip ( 1481.0408935547, -1771.6051513672, 18.795755386353+1, 44, 0, 0, 0, 255 ) outputChatBox ( "The Estate has been Loaded!!" ) end addEventHandler ( "onResourceStart", resourceRoot, loadResource ) function markerHit ( thePlayer, matchingDimension ) if ( source == theEntrance ) then outputChatBox ( "You are entering the Estate!" ) setElementInterior ( thePlayer , 3 , 389.8681640625, 173.9693145752, 1008.3828125 ) setElementDimension ( thePlayer, 3 ) end end addEventHandler ( "onMarkerHit", getRootElement(), markerHit ) thePlayer can not be a marker
  19. --buy uefa song elseif (object == "uefa") then if (tonumber(playerCash) >= tonumber(uefaPrice)) then if not (uefaPlaying) then addStat(account, "cash", -uefaPrice) setTimer(triggerClientEvent, 500, 1, "onPlayerPlayUEFASound", source, true) setTimer(outputChatBox, 50, 1, "* #FFFFFF"..getPlayerName(source).."#FFB200 bought the UEFA sound for "..tostring(uefaPrice).."$!", root, unpack(scriptcol[1])) uefaPlaying = true setTimer( function() uefaPlaying = false end , 39000, 1) end end end function disableClouds () setCloudsEnabled(false) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds )
  20. open core_server.lua and show 1067 line missed end
  21. TwiX!

    color picker

    you trigger to COLOR ® triggerServerEvent("setColor",source, r, g, b ) or triggerServerEvent(source,"setColor", r, g, b ) or triggerServerEvent(element,"setColor", r, g, b ) i don't know what it's element
  22. put your resource in folder mta/server/mods/deatchmatch/resources I do not remember exactly what to do with this error
  23. TwiX!

    send money

    addEvent("sendMoney", true) addEventHandler("sendMoney", getRootElement(), function ( playerNick, amount ) toWho = getPlayerFromName(playerNick) local playerAC = getPlayerAccount( source ) local toPlayerAC = getPlayerAccount( toWho ) local kaynak = getAccountData( playerAC, "points" ) or 0 local alici = getAccountData( toPlayerAC, "points" ) or 0 if (kaynak > tonumber(amount)) then if (toWho ~= false) then local kaynak = getAccountData( playerAC, "points" ) or 0 local alici = getAccountData( toPlayerAC, "points" ) or 0 setAccountData( toPlayerAC, "points", alici + amount ) name = getPlayerName(source) setAccountData( playerAC, "points", kaynak - amount ) outputChatBox("#c0c0c0* You've given point amount of: #abcdef" .. amount .. "#c0c0c0 to: #abcdef" .. playerNick,source,255,255,150,true) outputChatBox("#c0c0c0* #abcdef" ..name .. " #c0c0c0has given you point amount of: #abcdef" .. amount .. "#c0c0c0 points!",toWho,255,255,245,true) else outputChatBox("#c0c0c0* Player did not exist",source,255,0,0,true) end else outputChatBox("#c0c0c0* Insufficient founds!",source,255,0,0,true) end end ) you confused system source - is event (player) source - in your code (it's account) so you getPlayerName from account same for toWho
×
×
  • Create New...