Jump to content

TalatPlays

Members
  • Posts

    26
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by TalatPlays

  1. i think it's something like that addEventHandler("onClientResourceStart", resourceRoot, function() triggerEvent('addEngineResource', root, getResourceName(resource)) loadModels() end ) function loadModels() local example_dff = engineLoadDFF ('files/example.dff', 10052) engineReplaceModel(example_dff, 10052) local example_txd = engineLoadTXD('files/example.txd') engineImportTXD(example_txd, 10052) local example1_dff = engineLoadDFF ('files/example1.dff', 3095) engineReplaceModel(example1_dff, 7024) local example1_txd = engineLoadTXD('files/axample1.txd') engineImportTXD(example1_txd, 3095) local example2_col = engineLoadCOL("files/misc/example2.col") engineReplaceCOL(example2_col, 2685) end
  2. TalatPlays

    Rate this?

    nice but anyway i'll give you 3.5/10
  3. i did it for you ----Client GUIEditor = { window = {}, staticimage = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(300, 111, 400, 408, "Weapon Shop", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFB0303") btnClose = guiCreateButton(313, 371, 77, 27, "Close", false, GUIEditor.window[1]) GUIEditor.staticimage[1] = guiCreateStaticImage(9, 286, 345, 113, "quieditor/images/logohunter.png", false, GUIEditor.window[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(248, 89, 106, 105, "quieditor/images/rocketla.png", false, GUIEditor.window[1]) w3 = guiCreateButton(258, 210, 100, 67, "RPG$60000", false, GUIEditor.window[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(124, 92, 123, 99, "quieditor/images/minigun.png", false, GUIEditor.window[1]) w2 = guiCreateButton(138, 210, 100, 67, "MiniGun$100000", false, GUIEditor.window[1]) GUIEditor.staticimage[4] = guiCreateStaticImage(9, 91, 113, 100, "quieditor/images/heatseek.png", false, GUIEditor.window[1]) w1 = guiCreateButton(22, 210, 100, 67, "HRPG$60000", false, GUIEditor.window[1]) GUIEditor.label[1] = guiCreateLabel(18, 33, 323, 46, "------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 9, 255, 3) guiSetVisible(GUIEditor.window[1],false) bindKey ( "F5" , "down" , function() guiSetVisible(GUIEditor.window[1],not guiGetVisible(GUIEditor.window[1])) showCursor(not isCursorShowing()) end ) addEventHandler("onClientGUIClick", btnClose, function() if source == this then guiSetVisible(GUIEditor.window[1],false) showCursor(guiGetVisible(wnd)) end end ) local EnterShopMarker1 = createMarker(1367.74, -1279.6, 12.55, "cylinder", 1.5, 255, 150, 0, 150) local ExitShopMarker1 = createMarker(285.34, -41.7, 1000.5, "cylinder", 1.5, 255, 150, 0, 150) local OpenShopMarker1 = createMarker(295.5, -37.4, 1000.5, "cylinder", 2, 200, 150, 0, 150) setElementInterior(ExitShopMarker1, 1) setElementInterior(OpenShopMarker1, 1) createBlipAttachedTo(EnterShopMarker1, 6) local EnterShopMarker2 = createMarker(2159.16, 943.13, 9.82, "cylinder", 1.5, 255, 150, 0, 150) local ExitShopMarker2 = createMarker(285.67, -85.82, 1000.5, "cylinder", 1.5, 255, 150, 0, 150) local OpenShopMarker2 = createMarker(295.62, -79, 1000.5, "cylinder", 2, 200, 150, 0, 150) setElementInterior(ExitShopMarker2, 4) setElementInterior(OpenShopMarker2, 4) createBlipAttachedTo(EnterShopMarker2, 6) local EnterShopMarker3 = createMarker(2400.65, -1981.23, 12.54, "cylinder", 1.5, 255, 150, 0, 150) local ExitShopMarker3 = createMarker(297, -111.62, 1000.5, "cylinder", 1.5, 255, 150, 0, 150) local OpenShopMarker3 = createMarker(289.4, -108.5, 1000.51, "cylinder", 2, 200, 150, 0, 150) setElementInterior(ExitShopMarker3, 6) setElementInterior(OpenShopMarker3, 6) createBlipAttachedTo(EnterShopMarker3, 6) local EnterShopMarker4 = createMarker(-2626.8, 209.3, 3.6, "cylinder", 1.5, 255, 150, 0, 150) local ExitShopMarker4 = createMarker(316.53, -169.61, 998.6, "cylinder", 1.5, 255, 150, 0, 150) local OpenShopMarker4 = createMarker(311.65, -164.95, 998.6, "cylinder", 2, 200, 150, 0, 150) setElementInterior(ExitShopMarker4, 6) setElementInterior(OpenShopMarker4, 6) createBlipAttachedTo(EnterShopMarker4, 6) local EnterShopMarker5 = createMarker(2539, 2083.91, 9.82, "cylinder", 1.5, 255, 150, 0, 150) local ExitShopMarker5 = createMarker(315.65, -143, 998.6, "cylinder", 1.5, 255, 150, 0, 150) local OpenShopMarker5 = createMarker(313.13, -133.44, 998.6, "cylinder", 2, 200, 150, 0, 150) setElementInterior(ExitShopMarker5, 7) setElementInterior(OpenShopMarker5, 7) createBlipAttachedTo(EnterShopMarker5, 6) addEventHandler("onClientMarkerHit", root, function(player) if player == localPlayer and not isPedInVehicle(player) then if source == EnterShopMarker1 then triggerServerEvent("EnterShop", localPlayer, 1, 285.81, -39.73, 1001.52) elseif source == ExitShopMarker1 then triggerServerEvent("EnterShop", localPlayer, 0, 1365.96, -1280.34, 13.75) -- elseif source == EnterShopMarker2 then triggerServerEvent("EnterShop", localPlayer, 4, 286.2, -83.42, 1001.52) elseif source == ExitShopMarker2 then triggerServerEvent("EnterShop", localPlayer, 0, 2157.16, 943.13, 10.82) -- elseif source == EnterShopMarker3 then triggerServerEvent("EnterShop", localPlayer, 6, 295.53, -108.8, 1001.52) elseif source == ExitShopMarker3 then triggerServerEvent("EnterShop", localPlayer, 0, 2400.65, -1979.5, 13.54) -- elseif source == EnterShopMarker4 then triggerServerEvent("EnterShop", localPlayer, 6, 316.53, -167, 999.6) elseif source == ExitShopMarker4 then triggerServerEvent("EnterShop", localPlayer, 0, -2626.8, 212, 4.6) -- elseif source == EnterShopMarker5 then triggerServerEvent("EnterShop", localPlayer, 7, 313.65, -141.8, 999.6) elseif source == ExitShopMarker5 then triggerServerEvent("EnterShop", localPlayer, 0, 2536.5, 2083.91, 10.82) -- elseif source == OpenShopMarker1 or source == OpenShopMarker2 or source == OpenShopMarker3 or source == OpenShopMarker4 or source == OpenShopMarker5 or source == OpenPoliceShopMarker then guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end end) addEventHandler("onClientMarkerLeave", root, function(player) if player == localPlayer then if source == OpenShopMarker1 then guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end end) addEventHandler ("onClientGUIClick", root, function() if ( source == w1 ) then triggerServerEvent("w1",getLocalPlayer()) elseif (source == w2) then triggerServerEvent("w2",getLocalPlayer()) elseif (source == w3) then triggerServerEvent("w3",getLocalPlayer()) end end ) -----Server outputChatBox ( "PRESS F5 TO OPEN A SHOP OF HEAVY WEAPONS", getRootElement(), 255, 0, 0, true ) addEvent("w1",true) addEventHandler("w1",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 60000) then takePlayerMoney(source,60000) giveWeapon ( source , 36,3 ) setPedWeaponSlot(source, getSlotFromWeapon(36)) local name = getPlayerName(source) outputChatBox ( "#330079" .. name .. " #00FF00 Has Bought Weapon : Heat seeking RPG", getRootElement(), 255, 0, 0, true ) else outputChatBox("You don't have $60000 ", source, 255, 0, 0, true) end end ) ------------------------------------------------------------------------------------------ addEvent("w2",true) addEventHandler("w2",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 100000) then takePlayerMoney(source,100000) giveWeapon ( source , 38,50 ) setPedWeaponSlot(source, getSlotFromWeapon(38)) local name = getPlayerName(source) outputChatBox ( "#330079" .. name .. " #00FF00 Has Bought Weapon : MiniGun ", getRootElement(), 255, 0, 0, true ) else outputChatBox("You don't have $100000", source, 255, 0, 0, true) end end ) addEvent("EnterShop", true) addEventHandler("EnterShop", root, function(int, x, y, z) setElementInterior(source, int) setElementPosition(source, x, y, z) end) --------------------------------------------------------------------------------- addEvent("w3",true) addEventHandler("w3",root, function() local PlayerMoney = getPlayerMoney(source) if ( PlayerMoney >= 60000) then takePlayerMoney(source,60000) giveWeapon ( source , 35,3 ) setPedWeaponSlot(source, getSlotFromWeapon(35)) local name = getPlayerName(source) outputChatBox ( "#330079" .. name .. " #00FF00 Has Bought Weapon : Rocket Launcher ", getRootElement(), 255, 0, 0, true ) else outputChatBox("You don't have $60000 ", source, 255, 0, 0, true) end end ) but i didn't remove The bind of F5
  4. use Med for gta sa to get pos x y z Here: https://mega.nz/#!Uw5jGAqS!4JtWri9OYOyM2vuUp6Hv10GHV0t5E9gFMy_EaNLmkP4 copy the pos x y z and past it into this line below then add it to your map.map <removeWorldObject interior="0" model="" lodModel="0" posX="" posY="" posZ="" rotX="0" rotY="0" rotZ="0"></removeWorldObject>
  5. TalatPlays

    help me

    Try this : https://pastebin.com/ZRDE9tAc try to warp to yourself when the warp is disabled
  6. Try this : https://pastebin.com/kewmytZY
  7. TalatPlays

    help me

    set your fr_client.lua here
  8. Go to freeroam open up the file then open fr_client.lua and add this in line 8 setElementData( g_Me, 'isWarpIntoEnabled', nil ) setElementData( g_Me, 'isWarpEnabled', nil ) and Go to to into fall of bike and add this : {'chk', id='togglewarptme', text='Disable Warping', onclick=togglewarptome, width=1000, height = 20}, {'br' }, after that replace the old script in Warp to player window to : --------------------------- -- Warp to player window --------------------------- function warpInit() local players = table.map(getElementsByType('player'), function(p) return { player = p, name = getPlayerName(p) } end) table.sort(players, function(a, b) return a.name < b.name end) bindGridListToTable(wndWarp, 'playerlist', players, true) end function warpTo(leaf) if not leaf then leaf = getSelectedGridListLeaf(wndWarp, 'playerlist') if not leaf then return end end if isElement(leaf.player) then if ( getElementData( leaf.player, 'isWarpEnabled' ) == 'false' ) then outputChatBox( 'Error, You cannot warp to this player', 255, 0, 0, true ) return end server.warpMe(leaf.player) end closeWindow(wndWarp) end wndWarp = { 'wnd', text = 'Warp to player', width = 300, alpha = 1.0, controls = { { 'lst', id='playerlist', width=280, height=330, columns={ {text='Player', attr='name'} }, onitemdoubleclick=warpTo }, {'btn', id='warp', onclick=warpTo}, {'btn', id='cancel', closeswindow=true} }, oncreate = warpInit } function warpToCommand(cmd, player) if player then player = getPlayerFromName(player) if player then server.warpMe(player) end else createWindow(wndWarp) showCursor(true) end end addCommandHandler('warpto', warpToCommand) addCommandHandler('wt', warpToCommand) it's working 100% ,hope you will got it
  9. if you are using 'House_system' go to Your admin panel then search about house_system then tick on settings you're gonna find some settings there like " PlayerHouseCounter 3 3 tick on it and change "3" to "1" or open up the meta.xml and replace the following <settings> <setting name="*playerHouseCounter" value="3" accept="0-9" desc="How many houses can player have at the same time." /> <setting name="*keyLength" value="4" accept="0-9" desc="How many characters must be in house key." /> </settings> to : <settings> <setting name="*playerHouseCounter" value="1" accept="0-9" desc="How many houses can player have at the same time." /> <setting name="*keyLength" value="4" accept="0-9" desc="How many characters must be in house key." /> </settings>
  10. Here's the full script if anyone is interrested : ----Client-- GUIEditor = { checkbox = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(614, 118, 130, 14, "Disable deathmatch", false) GUIEditor.checkbox[1] = guiCreateCheckBox(593, 117, 17, 15, "", false, false) addEventHandler("onClientGUIClick",GUIEditor.checkbox[1], checkBox, false) end ) function checkBox() if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1])) then setElementData(localPlayer, "invincible", true) setVehicleDamageProof(getPedOccupiedVehicle(localPlayer),true) else setElementData(localPlayer, "invincible", false) setVehicleDamageProof(getPedOccupiedVehicle(localPlayer),false) end end addEventHandler ( "onClientPlayerDamage",localPlayer, function () if getElementData(source,"invincible") then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",localPlayer, function () if getElementData(source,"invencible") then cancelEvent() end end) function renderDeathmatchTag() local streamedPlayers = getElementsByType ("player", root, true) if streamedPlayers and #streamedPlayers ~= 0 then local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) then if getElementData (p, "invincible") then local ppos = {getElementPosition(p)} if getDistanceBetweenPoints3D (lpos[1], lpos[2], lpos[3], ppos[1], ppos[2], ppos[3]) <= 20 then local x, y = getScreenFromWorldPosition (ppos[1], ppos[2], ppos[3]+1.2) if x and y then dxDrawText ("Disabled deathmatch ! (Can't die)", x, y, x, y, tocolor (255,0,0), 0.5, "bankgothic", "center") end end end end end end end addEventHandler ("onClientRender", root, renderDeathmatchTag) --------Server function disableWeaponOnGodMod (prev,new) if getElementData(localPlayer, "invincible") then setPedWeaponSlot(localPlayer, 0) setVehicleDamageProof ( root, true ) end end addEventHandler ( "onClientRender", root, disableWeaponOnGodMod )
  11. one more thing please how do can i set a dxDrawtext on top positon of a player (head) i added this but it's not working : dxDrawText("Disabled death match ! (Cannot die)",sx,sy-30,sx,sy-30,tocolor(255,0,0),1.1,"default-bold","center","center")
  12. Hello all yesterday i find a script in Mta furom and i edited it and it's working 100% but the problem is it sets godmode for a Player only ! i want it to set godmode for player also vehicles so the player's car will not exploded by any other player so any help please i will very apreaciate it ? Here's The code it's Client : GUIEd itor = { checkbox = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(540, 98, 145, 14, " Disable Deathmatch", false) GUIEditor.checkbox[1] = guiCreateCheckBox(606, 112, 15, 15, "", false, false) GUIEditor.label[2] = guiCreateLabel(-50, -13, 123, 13, "", false, GUIEditor.checkbox[1]) addEventHandler("onClientGUIClick",GUIEditor.checkbox[1], checkBox, false) end ) function checkBox() if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1])) then setElementData(localPlayer, "invincible", true) setVehicleDamageProof(getPedOccupiedVehicle(player),true) else setElementData(localPlayer, "invincible", false) setVehicleDamageProof(getPedOccupiedVehicle(player),false) end end addEventHandler ( "onClientPlayerDamage",localPlayer, function () if getElementData(source,"invincible") then cancelEvent() end end)
  13. Dude ,type refresh in your server Console !
  14. addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), call ( getResourceFromName ( "scoreboard" ), "scoreboardAddColumn", "Online" ) addEventHandler ( "onResourceStart" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( player , "Online" , "00 H 00 M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end else setElementData ( player , "Online" , "N/A" ) end end end ) addEventHandler ( "onResourceStop" , resourceRoot , function ( ) for index , player in ipairs ( getElementsByType ( "player" ) ) do local pAccount = getPlayerAccount ( player ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( player , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end end ) addEventHandler ( "onPlayerLogin" , root , function ( _ , pAccount ) local minutes = getAccountData ( pAccount , "Online.minutes" ) if minutes then local hours = getAccountData ( pAccount , "Online.hours" ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( source , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) else setAccountData ( pAccount , "Online.minutes" , 0 ) setAccountData ( pAccount , "Online.hours" , 0 ) setElementData ( source , "Online" , "00 H 00 M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , source ) setElementData ( source , "Online.timer" , timer ) end end ) addEventHandler ( "onPlayerLogout" , root , function ( pAccount ) local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end ) addEventHandler ( "onPlayerJoin" , root , function ( ) setElementData ( source , "Online" , "N/A" ) end ) addEventHandler ( "onPlayerQuit" , root , function ( ) local pAccount = getPlayerAccount ( source ) if not isGuestAccount ( pAccount ) then local timer = getElementData ( source , "Online.timer" ) if isTimer ( timer ) then killTimer ( timer ) end end end ) function updatePlayerOnline ( player ) local pAccount = getPlayerAccount ( player ) local minutes = getAccountData ( pAccount , "Online.minutes" ) local hours = getAccountData ( pAccount , "Online.hours" ) minutes = tostring ( tonumber ( minutes ) + 1 ) if minutes == "60" then hours = tostring ( tonumber ( hours ) + 1 ) minutes = "00" end setAccountData ( pAccount , "Online.minutes" , tonumber ( minutes ) ) setAccountData ( pAccount , "Online.hours" , tonumber ( hours ) ) if # tostring ( minutes ) == 1 then minutes = "0" .. minutes end if # tostring ( hours ) == 1 then hours = "0" .. hours end setElementData ( player , "Online" , hours .. " H " .. minutes .. " M" ) local timer = setTimer ( updatePlayerOnline , 60000 , 1 , player ) setElementData ( player , "Online.timer" , timer ) end i have no idea if it's working or not ,but you should try
  15. there will be no problem if you setup The fps to 60 you can also set it as 100
  16. . Damn ,whole this time i was typing it at server's Console ,such a noob me and my brain i spend alot of time for this . discord ! Thank you very much
  17. Thank you very much , but when i type # node -v in console it shows nothing !
×
×
  • Create New...