Jump to content

Search the Community

Showing results for tags 'check'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 20 results

  1. I would like to ask where I can find a guide on: createElement, ElementData, Shaders etc. I need it because soon I will be making radar and inventory system. It would be nice if you would share your knowledge on the things I gave
  2. Hi Please i need function if checkbox checked txd will be remplaced if unchek Return Normal
  3. hello, I am trying to make a script that stores armor if it's undamaged but i got some warnings in the line 10 in the client side here is the script ,it's very simple --Client Side function storeArmor ( ) local armor = getPedArmor( player ) if ( armor == 100 ) then return function () triggerServerEvent("setdaarmor",true) outputChatBox( "Your armor got stored",255,255,255,true ) end end end addCommandHandler ( "storearmor", showArmor ) -------------------------------------------------------------------------- addEvent("setdaarmor",true) addEventHandler("setdaarmor", resourceRoot, function() setPedArmor( 0, player ) end) thank you ,notice if i forgot something.
  4. i want to add afk check to my nametag, but i dont know how i tried this, but doesn't working --server function checkAFKPlayers() for index, thePlayer in ipairs(getElementsByType("player")) do if (getPlayerIdleTime(thePlayer) > 300000) then AFKCheck = "AFK" end end end setTimer(checkAFKPlayers, 30000, 0) --client (only the two line) local AFKCheck = {} dxDrawColorText ("#00BAFF" .. getPlayerName(player) .. " (" .. AFKState .. ")", sx-w, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), player ~= g_Me and textscale*NAMETAG_TEXTSIZE or (textscale*NAMETAG_TEXTSIZE)/1.5, srfont, "center", "bottom", false, false, false ) how to make this working? /sorry for my bad english:c/
  5. How to destroy a marker? I did not find any function to do this. i use destroyElement(markerName)
  6. hello i was making a script which is depending on the rotation but i was trying to rotate it when i press a button the full script is to create a minigun and attach it to the player's body and allow him to rotate the weapon without aiming it. function createMinigunWeapon() -- Create the weapon 1 meter above the player local x, y, z = getElementPosition(getLocalPlayer()) local weapon = createWeapon("minigun", x, y, z + 5) local rotX, rotY, rotZ = getElementRotation(weapon) bindKey("num_6","down", function() setElementRotation(weapon,0,0,rotZ+10) end ) also i have read the wiki ,i tried to follow its instructions but i totally failed :3 notice : i have just posted the part i need in the script
  7. hello i was working on a small script which attach the star icon if the player is wanted but i got a debug output it said that there is a bug in the compare in line #3 here is the script ,i think i should change the Event "onResourceStart" function wanted() local wanted = getPlayerWantedLevel(player) if ( wanted > 0 ) then x, y, z = getElementPosition(player) i = getElementInterior(player) d = getElementDimension(player) wantedpickup = createObject( 1247, x, y, z+1, i, d ) attachElements( wanted , player ) end end addEventHandler("onResourceStart",root,wanted) also i had anther script which can't find a file in its meta file "saur.png" <meta> <info author="ProMax" type="script" version="2.0" name="staff-tag" description="Simple Staff Tag Script" /> <script src="client.lua" type="client"/> <file src="saur.png"/> </meta> function renderStaffTag() local streamedPlayers = getElementsByType ("player", root, true) local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) then if not getPlayerTeam(p) or getPlayerTeam(p) ~= getTeamFromName("Staff") then return end if streamedPlayers and #streamedPlayers ~= 0 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 ("Staff Member", x+1, y+1, x, y, tocolor (0, 0, 0), 1, "pricedown", "center") dxDrawText ("Staff Member", x, y, x, y, tocolor (52, 0, 66), 1, "pricedown", "center") end end end end end end addEventHandler ("onClientRender", root, renderStaffTag) also if someone can add a part which draw an image in the game attached to the player with name "saur.png" Thanks
  8. hi ,i have scripted a gate depending on account name , but i have started it ,it creates the marker and the object but the object isn't moving door = createObject ( 3089, 2004.5 , -1280 , 36.900001525879 , 0, 0, 0 ) marker = createMarker ( 2005.5 , -1280 , 35.900001525879 , 'cylinder', 1, 0, 0, 0, 255 ) -- after creating function openForProMax() local thePlayer = getAccountPlayer ( promax ) -- get the client attached to the account if ( getElementType ( thePlayer ) == "player" ) then moveObject ( door,2000, 2004.5 , -1280 , 30.900001525879, 0, 0, 0 ) else return end end addEventHandler ( 'onMarkerHit', marker, openForProMax ) function closeAfterProMax() moveObject ( door,2000, 2004.5 , -1280 , 36.900001525879, 0, 0, 0 ) end addEventHandler ( 'onMarkerLeave', marker, closeAfterProMax )
  9. hello, i am promax and i am scripting disable killing between two teams ( Military , Police ) ,i have tried to make it but i have failed 100% :3 ,i just knew the functions from an ex post ,but it wasn't useful that much but it was maded by Iprestege (Fahad) he helped me lil a bit ,also taught me some new functions and i appreciate what he have done for me, the script that he gave me --this was my first try to make these teams can't get killed. local team = getTeamFromName (getLocalPlayer()) addEventHandler ( 'onClientPlayerDamage',root, function () if ( team == "Unemployed" ) or ( team == "Off Duty Workers" ) or ( team == "Civilian" ) or ( team == "Emergency" ) then if getElementData ( Player, "team" ) then cancelEvent() end end end ) ---------------------------------------------------------------------------------------------------------------------- --that was Iprestege's one addEventHandler ( 'onClientPlayerDamage',localPlayer, function ( aAttacker ) if ( aAttacker and getElementType ( aAttacker ) == 'player' and aAttacker ~= source ) then local aLocalTeam = getPlayerTeam ( source ) local aAttackerTeam = getPlayerTeam ( aAttacker ) if ( aLocalTeam and aAttackerTeam ) then if ( aLocalTeam == getTeamFromName ( 'Unemployed' ) and aAttackerTeam == getTeamFromName ( 'Police' ) ) then cancelEvent ( ) end end end end ) my question here ,how can i use table in Iprestege's one for the aAttackerTeam and aLocalTeam thank you :3
  10. hello,today i had to learn how make the freeroam (F1) only for ACL admin , but it output a debug notice Error: freeroam\fr_client.lua:1596: attempt to call global 'getPlayerAccount' (a nil value) addEventHandler('onClientResourceStart', g_ResRoot, function() local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? fadeCamera(true) setTimer(getPlayers, 1000, 1) bindKey('f1', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() guiCheckBoxSetSelected(getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me)) guiCheckBoxSetSelected(getControl(wndMain, 'falloff'), canPedBeKnockedOffBike(g_Me)) setJetpackMaxHeight ( 9001 ) triggerServerEvent('onLoadedAtClient', g_ResRoot) end end ) thank you for reading ,
  11. hey i have a script which makes the slots of the players half than the current local curMaxPlayers = getMaxPlayers() local newMaxPlayers = math.ceil( curMaxPlayers / 2 ) setMaxPlayers( newMaxPlayers ) and i tried to make it double the slots by changing "/" into "*" but it failed can someone tell me what to do,and please don't tell me to change the config i am not that silly :3
  12. Hey i make this script when you have low fuel to start a sound alarm but i don't know how to make to check this when you are in helicopter : function helicopter () if ( isPedInVehicle ( localPlayer ) == false ) then return false end ---------------------------Parts----------------------- local veh = getPedOccupiedVehicle(getLocalPlayer()); local maxfuel = ---myStuff--; local fuel = ---myStuff----------; if (isElement(veh) and getElementModel(veh) == 487 or 497 or 417 or 563 ) then if fuel <= 5 then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.2) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundV ) addEventHandler ( "onClientVehicleExit", root, stopMySound ) killTimer(tm) end end end tm = setTimer (helicopter , 5000 , 0) addEventHandler ( "onClientResourceStart", root, helicopter ) function stopMySound() stopSound ( sound ) unbindKey ( "Z", "down", stopMySoundV ) end function stopMySoundV() stopSound ( sound ) removeEventHandler( "onClientVehicleExit", root, stopMySound ) end This all work , but when he kill the timer i can't use ' resetTimer ' because he killed it , so how to make to reset that timer when he leave the vehicle ? this work first time , but when i enter again in vehicle he wont verify again.
  13. hello i have a script which is depending on some kind of vip system but it's bugged because there is something wrong in the compare in the line "7" which is a laser script. local laserColor = {[2]={255, 0, 0}, [3]={255, 100, 0}} addCommandHandler("laser", function (thePlayer) if not exports["(T-RPG)VIP"]:isPlayerVIP(getAccountName(getPlayerAccount(thePlayer))) then return end local vip = exports["(T-RPG)VIP"]:isPlayerVIP(thePlayer) if vip > 1 then return end if getElementData(thePlayer, "laser.on") then lState="Disabled" r,g,b=unpack(laserColor[vip]) setElementData(thePlayer, "laser.on", false) else lState="Enabled" r,g,b=unpack(laserColor[vip]) setElementData(thePlayer, "laser.on", true) end setElementData(thePlayer, "laser.aim", false) exports["(T-RPG)Info"]:sendMessage(thePlayer,"Laser: The laser is now ".. lState ..".",r,g,b) end)
  14. addEvent('showAssistanceMsg', true) addEventHandler('showAssistanceMsg', root, function(name, location) theAlpha = 255 rand = math.random(-50, 50) function showMSG() if theAlpha > 0 then theAlpha = theAlpha - 0.3 dxDrawText("(..name..)" Requesting Medical Assistance in '(..location..)',x(914.0),y(453.0+rand),x(1322.0),y(504.0),tocolor(0,205,0,theAlpha),x(1.3),"default-bold","center","center",false,false,false) else removeEventHandler('onClientRender', root, showMSG) end end addEventHandler('onClientRender', root, showMSG) end end end end ) function x(f) local sx, sy = guiGetScreenSize() return (sx/1440) * f end function y(f) local sx, sy = guiGetScreenSize() return (sy/900) * f end It's a simple notification script for a job with a command but there is a bug i can't fix which is ')' expected near 'Requesting' ,,please answer asap
  15. hello i have created a simple staff tag but i am using dxdrawtext to make it but it's bugged .it includes every time to have this tag when i am in the criminal team it draws the text. function renderStaffTag() local streamedPlayers = getElementsByType ("player", root, true) if getPlayerTeam(p) or getPlayerTeam(p) ~= getTeamFromName("Staff") then if streamedPlayers and #streamedPlayers ~= 0 then local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) 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 ("Staff Member", x+1, y+1, x, y, tocolor (0, 0, 0), 1, "pricedown", "center") dxDrawText ("Staff Member", x, y, x, y, tocolor (52, 0, 66), 1, "pricedown", "center") end end end end end end end addEventHandler ("onClientRender", root, renderStaffTag)
  16. i have scripting a illegal weapon factory marker but i want to show a loading progress while creating a weapon ,i have scripted it and i have checked the debugscript log and there isn't something wrong ,also i wanna hide the hud and the radar --client cwm = createMarker( 1983.65601, -2413.86963, 12.54688, "cylinder", 2, 150, 0, 75, 255 ) --this creates the marker GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.2726,0.3275,0.3186,0.4537,"(Weapon Factory)",true) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Memo[1] = guiCreateMemo(151,51,199,46,"On button click you will w\nait for 20 second to create M4",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Memo[2] = guiCreateMemo(151,99,202,46,"On button click you will wait for 20 second to create AK-47",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Button[1] = guiCreateButton(16,59,130,41,"100M4 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(15,105,130,41,"100AK-47 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(17,152,130,41,"18 Gernades for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(150,148,202,46,"On button click you will wait for 20 second to create Gernade",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[3],true) GUIEditor_Memo[4] = guiCreateMemo(150,195,202,46,"On button click you will wait for 20 second to create Rifle",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[4],true) GUIEditor_Button[4] = guiCreateButton(17,197,130,41,"75 Rifle for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[5] = guiCreateMemo(150,243,202,46,"On button click you will wait for 20 second to create Sniper",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[5],true) GUIEditor_Button[5] = guiCreateButton(18,246,130,41,"75 Sniper for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[6] = guiCreateMemo(151,290,202,46,"On button click you will wait for 20 second to create UZI",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[6],true) GUIEditor_Button[6] = guiCreateButton(20,293,130,41,"200 UZI for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[7] = guiCreateMemo(150,337,202,46,"On button click you will wait for 20 second to create C.shotgun",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(18,340,130,41,"200 C.shotgun for 150$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(24,30,324,20,"Regards,(T-RPG)ProMax",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],150,0,150) GUIEditor_Button[11] = guiCreateButton(298,20,55,26,"Close",false,GUIEditor_Window[1]) --creates the GUI function ToggleCWMMenu ( hit ) if ( hit and hit == localPlayer ) then if eventName == "onClientMarkerHit" then guiSetVisible ( GUIEditor_Window[1],true ) showCursor ( true ) showChat ( false ) showHud ( false ) showRadar ( false ) elseif eventName == "onClientMarkerLeave" then guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showHud ( true ) showRadar ( true ) -- shows the chat and i don't know what about the hud end end end addEventHandler("onClientMarkerHit",cwm,ToggleCWMMenu) addEventHandler("onClientMarkerLeave",cwm,ToggleCWMMenu) addEventHandler ('onClientGUIClick',GUIEditor_Button[11], -- that was the closing button function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showRadar ( true ) showHud ( true ) end,false ) --rest of buttons addEventHandler ('onClientGUIClick',GUIEditor_Button[1], function () guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) triggerServerEvent ("GiveM4",localPlayer) end,false ) --then the second part function drawStaticBar() dxDrawRectangle((sx/2)-270, (sy/2)-22, 540.0, 44.0, tocolor(255,197,0,150), false) dxDrawRectangle((sx/2)-265, (sy/2)-16, 530.0, 33.0, tocolor(0,0,0,250), false) end function drawLoadingBar() if (tonumber(createPercent) >= 100) then removeEventHandler("onClientRender", root, drawStaticBar) removeEventHandler("onClientRender", root, drawLoadingBar) showCursor(false) guiSetInputEnabled(false) else dxDrawRectangle((sx/2)-261, (sy/2)-12, tonumber(createPercent)*5.22, 25.0, tocolor(0,0,235,255), true) end dxDrawBorderedText("Creating... "..tostring(createPercent).."%", (sx/2)-145, (sy/2)-15, (sy/2)-1, (sx/2)-5, tocolor(0,255,0,255),1.0,"bankgothic","left","top",false,false,true) end addEvent("creating",true) addEventHandler("creating",root, function (weaponName) name = tostring(weaponName) if isTimer(createTimer) then killTimer(createTimer) end trainPercent = 0 showCursor(true) guiSetInputEnabled(true) trainTimer = setTimer(function () createPercent = createPercent +1 end, 100, 100) addEventHandler("onClientRender",getRootElement(),drawLoadingBar) addEventHandler("onClientRender",getRootElement(),drawStaticBar) end) --Server -- starting with the Event that i tiggered in the Client side addEvent ('GiveM4',true) addEventHandler ('GiveM4',root, -- then i don;t know what to do:3 function () if not getPlayerTeam(source) or getPlayerTeam(source) ~= getTeamFromName("Criminal") then return outputChatBox( 'You are not a criminal to create weapons',source,255,0,0 ) end if getPlayerMoney(source) or getPlayerMoney(source) >= 150 then triggerClientEvent(player,"creating",player,weaponName) setTimer( function () giveWeapon(client,31,100) end,false ,1000,1,client ) takePlayerMoney(client,150) else outputChatBox('You do not have enough money to create this weapon', 255, 0, 0 ) end end ) please answer as soon as possible ,I am on fire :3.
  17. hi all i have made a simple script but i have added a part to the script which allows only a team to use this marker but i can't see the marker ,here you are the script : -- Server Side local criminalsTeam = createTeam("Criminals",150,0,0) local newVehicle = { } local myBlip = { } local marker = { } addEvent('MyEvent',true) addEventHandler('MyEvent',root, function ( ) if newVehicle [ source ] and isElement ( newVehicle [ source ] ) then return false end newVehicle [ source ] = createVehicle ( 413,1603.34717,-1459.95898,13.68424 ) warpPedIntoVehicle ( source,newVehicle [ source ] ) myBlip [ source ] = createBlip( 1019.93677,2373.41040,10.93885,51,2,255,0,0,255,0 ) setElementVisibleTo( myBlip [ source ],root,false ) setElementVisibleTo( myBlip [ source ],source,true ) marker [ source ] = createMarker ( 1019.93677,2373.41040,9.93885,'cylinder',2,0,255,0,255,source ) end ) addEventHandler ( 'onMarkerHit',resourceRoot, function ( hit ) if ( hit and getElementType ( hit ) == 'vehicle' ) then local player = getVehicleController ( hit ) if ( source == marker [ player ] )then if isElement ( newVehicle [ player ] ) then if ( hit == newVehicle [ player ] ) then destroyElement ( newVehicle [ player ] ) destroyElement ( myBlip [ player ] ) destroyElement ( marker [ player ] ) newVehicle [ player ] = nil myBlip [ player ] = nil marker [ player ] = nil givePlayerMoney ( player,10000 ) end end end end end ) addEventHandler ( 'onPlayerVehicleExit',root, function ( vehicle ) if ( vehicle == newVehicle [ source ] ) then if isElement ( newVehicle [ source ] ) then destroyElement( newVehicle [ source ] ) newVehicle [ source ] = nil end if isElement ( myBlip [ source ] ) then destroyElement( myBlip [ source ] ) myBlip [ source ] = nil end if isElement ( marker [ source ] ) then destroyElement( marker [ source ] ) marker [ source ] = nil end end end ) addEventHandler ( 'onPlayerQuit',root, function ( ) if isElement ( newVehicle [ source ] ) then destroyElement( newVehicle [ source ] ) newVehicle [ source ] = nil end if isElement ( myBlip [ source ] ) then destroyElement( myBlip [ source ] ) myBlip [ source ] = nil end if isElement ( marker [ source ] ) then destroyElement( marker [ source ] ) marker [ source ] = nil end end ) function local allowteam = getTeamFromName("Criminals") if (allowteam) then tiggerClientEvent( thePlayer,"show",thePlayer,root ) else then tiggerClientEvent( thePlayer,"dshow",thePlayer,root ) end Client: -- Client local marker = createMarker ( 1616.44446,-1506.94568,13.20866,"cylinder",1,255,0,0,0 ) local ped = createPed ( 28,1616.44446, -1506.94568, 14.2066,90,0,0 ) setElementFrozen( ped,true ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(0.3698,0.5208,0.2517,0.1863,"\"Drug Delivery Request\"",true) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) guiSetAlpha(GUIEditor_Window[1],1) guiWindowSetMovable(GUIEditor_Window[1],false) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Button[1] = guiCreateButton(29,114,92,31,"Cancel",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(158,114,92,31,"Accept",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(11,26,264,79,"If you Pressed \"Accept\"Follow The Blip in the radar and you will gain 10000$ .If you Pressed Cancel or Leaved the Vehicle in the Delivery then your mission failed.",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) addEvent( "show",true ) addEventHandler("show",marker, function ToggleDDMenu ( hit ) if ( hit and hit == localPlayer ) then if eventName == 'onClientMarkerHit' then guiSetVisible ( GUIEditor_Window[1],true ) showCursor ( true ) elseif eventName == 'onClientMarkerLeave' then guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) end end end addEventHandler("onClientMarkerHit",marker,ToggleDDMenu) addEventHandler("onClientMarkerLeave",marker,ToggleDDMenu) addEventHandler("onClientRender", getRootElement(), function() local x, y, z = getElementPosition(ped) local x2, y2, z2 = getElementPosition(localPlayer) if(isLineOfSightClear(x, y, z, x2, y2, z2, true, true, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+1.1) if(sx) and (sy) then local distance = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distance < 30) then dxDrawText("Drugs Dealer", sx+2, sy+2, sx, sy, tocolor(0,0,0), 2-(distance/20), "arial", "center", "center") dxDrawText("Drugs Dealer", sx, sy, sx, sy, tocolor(255,0,0), 2-(distance/20), "arial", "center", "center") end end end end ) addEventHandler ('onClientGUIClick',GUIEditor_Button[1], function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) end,false ) addEventHandler ('onClientGUIClick',GUIEditor_Button[2], function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) triggerServerEvent ("MyEvent",localPlayer) end,false ) addEventHandler ( 'onClientPedDamage',ped,cancelEvent ) addEvent("dshow",true) addEventHandler("dshow",marker, function dontshow guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) outPutChatBox("You Aren't a criminal to deliver drugs",150,0,0) end end end ) please answer as soon as possible ,thank you.
  18. i want to set the taser script for the police team --client local cFunc = {} local cSetting = {} cSetting["shots"] = {} cSetting["shot_calcs"] = {} local last_shot = 1 -- FUNCTIONS -- cFunc["render_shots"] = function() for index, tbl in pairs(cSetting["shots"]) do dxDraw:OedLine3D(tbl[1], tbl[2], tbl[3], tbl[4], tbl[5], tbl[6], tocolor(0, 255, 0)) end end cFunc["draw_shot"] = function(x1, y1, z1, x2, y2, z2) table.insert(cSetting["shots"], last_shot, {x1, y1, z1, x2, y2, z2}) -- SHOT CALCULATING local lastx, lasty, lastz = x1, y1, z1 local dis = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) cSetting["shot_calcs"][last_shot] = {} for i = 1, dis, 0.5 do -- cSetting["shot_calcs"][i] = nx, ny, nz -- cSetting["shot_calcs"][last_shot][i] = end last_shot = last_shot+1 end cFunc["shot_weapon"] = function(hitX, hitY, hitZ, x, y, z) playSound3D("data/Fire.wav", x, y, z) local s = playSound3D("data/Fire.wav", hitX, hitY, hitZ) setSoundMaxDistance(s, 50) for i = 1, 5, 1 do fxAddPunchImpact(hitX, hitY, hitZ, 0, 0, 0) fxAddSparks(hitX, hitY, hitZ, 0, 0, 0, 8, 1, 0, 0, 0, true, 3, 1) end cFunc["draw_shot"](x, y, z, hitX, hitY, hitZ) fxAddPunchImpact(x, y, z, 0, 0, -3) end cFunc["wait_shot"] = function() toggleControl("fire", false) setTimer(function() toggleControl("fire", true) end, 350, 1) end cFunc["shot_check"] = function(wp, _, _, hitX, hitY, hitZ, element, startX, startY, startZ) if(wp == 23) then cFunc["shot_weapon"](hitX, hitY, hitZ, startX, startY, startZ) if(source == localPlayer) then cFunc["wait_shot"]() end end end dxDraw:OedLine3D = function(x1, y1, z1, x2, y2, z2, color) local dis = getDistanceBetweenPoints3D(x1, y1, z1, x2, y2, z2) local lastx, lasty, lastz = x1, y1, z1 --for i = 1, dis, 3 do -- dxDrawLine3D(x1, y1, z1, x2, y2, z2) --end end cFunc["anim_check"] = function(_, wep, bodypart) if(wep == 23) and (bodypart == 9) then setPedAnimation(source, "ped", "KO_shot_face", 10000, false, true, false) elseif(wep == 23) and (bodypart == 8) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) elseif(wep == 23) and (bodypart == 7) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) elseif(wep == 23) and (bodypart == 6) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) elseif(wep == 23) and (bodypart == 5) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) elseif(wep == 23) and (bodypart == 4) then setPedAnimation(source, "CRACK", "crckdeth3", 10000, false, true, false) elseif(wep == 23) and (bodypart == 3) then setPedAnimation(source, "ped", "KO_shot_stom", 10000, false, true, false) elseif(wep == 23) and (bodypart == 2) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) elseif(wep == 23) and (bodypart == 1) then setPedAnimation(source, "CRACK", "crckdeth2", 10000, false, true, false) end end -- EVENT HANDLER -- addEventHandler("onClientPlayerWeaponFire", getRootElement(), cFunc["shot_check"]) addEventHandler("onClientRender", getRootElement(), cFunc["render_shots"]) addEventHandler("onClientPedDamage", getRootElement(),cFunc["anim_check"]) addEventHandler("onClientPlayerDamage", getRootElement(),cFunc["anim_check"]) and if it any anther team then he can't use the taser function i will show you how did i do it: I also wanted to create teams and i want the link of it from wiki
  19. Hello I have made a script but it's not done yet so i need help with the markers they aren't getting viewed in game i think i have made the part of the markers correctly please check it, marker = createMarker(1615.48865, -1506.98303, 12.20866,"cylinder", 2, 255, 0, 0, 255) () getRootElement GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Window[1] = guiCreateWindow(0.5399,0.6794,0.4063,0.456,"Drug Delivery System ",true) GUIEditor_Button[1] = guiCreateButton(317,345,68,40,"Accept",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(245,346,68,39,"Cancel",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(18,33,438,102,"Deliver the Car to the blip on the radar in LV .\nIf there is any bugs report it to the owners.",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) --to Show the GUI function ToggleDDMenu() if guiGetVisible(GUIEditor_Window[1]) then guiSetVisible(GUIEditor_Window[1], false) showCursor(false) else guiSetVisible(GUIEditor_Window[1], true) showCursor(true) end addEventHandler("onMarkerHit",marker,ToggleDDMenu) wish to get replayed as soon as possible . thank you.
  20. Hello , as the owner of Funny freeroam i would like to introduce you why did i have created this server,and the list of free roles that we need , Indroduction: Free Staff Places: Thank you for reading
×
×
  • Create New...