Jump to content

Monty

Members
  • Posts

    167
  • Joined

  • Last visited

Everything posted by Monty

  1. ryan you stole this script from me
  2. THIS IS MY SCRIPT! I'M THE ONLY OWNER! HERE THE ORIGINAL ONE https://community.multitheftauto.com/ind ... ls&id=4846
  3. what's wrong in this script... the console say bad argument for getAccountName server function createFBITeam () FBITeam = createTeam ("FBI", 41, 41, 41) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinFBI() local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( source ) ) ) if ( gang == "FBI" ) then setPlayerTeam(source,FBITeam) setElementModel(source,286) setElementData( source, "Occupation", "FBI", true ) outputChatBox("You are now an FBI agent.",source,0,255,0) end addEvent("setFBI", true) addEventHandler("setFBI",root,joinFBI) client local marker = createMarker( 1787.5069580078, -1382.6146240234, 14.7578125, "Cylinder", 2, 41, 41, 41, 153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"FBI agent") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take FBI team job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function FBIjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, FBIjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, FBIjobleave) function joinTeam() triggerServerEvent("setFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeFBIWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeFBIWindow, false)
  4. meta.xml <meta> <info author="stolka" name="police" version="1.0" type="script"/> <script src="police-c.lua" type="client"/> <script src="police-s.lua" type="server"/> </meta>
  5. the console do not report any error but the marker doesnt appear like the radar blip, the team don't get created too
  6. don't work server createBlip ( 1552.4996337891, -1677.3264160156, 15.1953125, 30 ) function createSAPDTeam () SAPDteam = createTeam ("SAPD", 100, 149, 237) end addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) function joinSAPD() setPlayerTeam(source,SAPDteam) setElementModel(source, 280) giveWeapon ( source, 3 ) setElementData( source, "Occupation", "SAPD", true ) outputChatBox("You are now SAPD agent.",source,0,255,0) end addEvent("setSAPD", true) addEventHandler("setSAPD",root,joinSAPD) addEvent("police:arrest", true) addEventHandler("police:arrest", root, function (police) setElementPosition( source, 68.12606811523, 83.171829223633, 1001.0390625 ) givePlayerMoney(police, 1000) -- Gives 100$ to the medic each time the function is executed takePlayerMoney(source, 100) -- Takes 100$ from the source when he get healed end) client local marker = createMarker( 1552.4996337891, -1677.3264160156, 15.1953125, "Cylinder", 1.5, 0, 0, 255, 150) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"SAPD agent") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take SAPD job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function SAPDjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, SAPDjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, SAPDjobleave) function joinTeam() triggerServerEvent("setSAPD",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeSAPDWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeSAPDWindow, false) -------- addEventHandler("onClientPlayerDamage", localPlayer, function(attacker, weapon, bodypart, loss) team = getPlayerTeam(attacker) if (attacker and getElementType(attacker) == "player" and weapon == 3 and team and getTeamName(team) == "SAPD") then -- Checks if the player is using spray and is into Medic team cancelEvent() -- Cancels the damage cause by the spray if (not isTimer(pause)) then triggerServerEvent("police:arrest", localPlayer, attacker) -- Calls the Server Event pause = setTimer(function() end, 1000, 1) -- Makes a timer for the function so it won't fully heal in the first time end end end end)
  7. Monty

    script error

    it say nothing! the team don't get created and the marker too
  8. Monty

    script error

    and can give a solution without the /debug?
  9. Monty

    script error

    what's wrong in this script??? client local marker = createMarker( 1037.8309326172, -1029.5063476563, 31.1015625, "Cylinder", 1.5, 255, 153, 0, 150) --- marker createMarker ( float x, float y, float z, [string theType, float size, int r, int g, int b, int a] ) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"Mchanic job") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Mechanic job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take mechanic job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function Mecjob(hitElement) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, Mecjob) function Mecjobleave(leaveElement) if getElementType(leaveElement) == "player" and (leaveElement == localPlayer) then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, Mecjobleave) function joinTeam() triggerServerEvent("setMec",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeMedicWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeMedicWindow, false) addEventHandler("onClientPlayerDamage", localVehicle, local localVehicle = getPedOccupiedVehicle(localPlayer) function(attacker, weapon, bodypart, loss) team = getPlayerTeam(attacker) if (attacker and getElementType(attacker) == "player" and weapon == 42 and team and getTeamName(team) == "Mechanic") then cancelEvent() -- Cancels the damage cause by the spray if (not isTimer(pause)) then if (health < 99) then triggerServerEvent("mechanic:repair", localVehicle, attacker) -- Calls the Server Event pause = setTimer(function() end, 1000, 1) -- Makes a timer for the function so it won't fully heal in the first time end end end end server createBlip ( 1036.1654052734, -1027.8570556641, 32.1015625, 27 ) function createMechanicTeam () mecTeam = createTeam ("Mechanic", 255, 153, 0) end addEventHandler ("onResourceStart", resourceRoot, createMechanicTeam) function joinMec() setPlayerTeam(source,mecTeam) setElementModel(source, 50) giveWeapon ( source, 42, 999 ) setElementData( source, "Occupation", "Mechanic", true ) outputChatBox("You are now Mechanic.",source,0,255,0) end addEvent("setMec", true) addEventHandler("setMec", root, joinMec ) addEvent("mechanic:repair", true) addEventHandler("mechanic:repair", root, function (mechanic) if (getElementHealth(localVehicle) < 100) then local Heal = getElementHealth(localVehicle) + 10 -- New health setElementHealth(localVehicle, Heal) if (Heal > 100) then setElementHealth(localVehicle, 1000) end givePlayerMoney(mechanic, 1000) -- Gives 100$ to the medic each time the function is executed end end
  10. Monty

    zombie

    i downloaded this mod... but no zombie spawned! https://community.multitheftauto.com/ind ... iew&id=347 i put the resource in acl adnin group too but still doesnt work ((( help pls
  11. Monty

    random skin

    i need somthing like blazy said
  12. Monty

    random skin

    i alway use the code setElementModel(source, ID) is possible to specify some IDs and and say to get one of the accidentaly???
  13. is it possible to change the animation of a weapon???
  14. Monty

    robber error

    @seb is it possible to remove the ped and set the team robber with a commandhandler?
  15. Monty

    robber error

    so what's the full code???
  16. Monty

    robber error

    hi it's me again... hi have a little problem with my script... server-side: function createRobberTeam () robberTeam = createTeam ( "Robber", 250, 0, 0 ) end addEventHandler ( "onResourceStart", resourceRoot, createRobberTeam ) function givePlayerJob ( ) setPlayerTeam ( localPlayer, robberTeam ) end addCommandHandler ( "robber", givePlayerJob ) addEvent ( "givePlayerPay", true ) function givePlayerRobPay () money = math.random ( 350, 1020 ) givePlayerMoney ( source, money ) outputChatBox ( "You succesfully robbed the house and made $" ..money, source ) fadeCamera ( source, false, 1, 0, 0, 0 ) setTimer ( fadeCamera, 1000, 1, source, true, 1 ) end addEventHandler ( "givePlayerPay", root, givePlayerRobPay ) client-side: addEvent ( "createHouseEvent", true ) function createHouses () x, y, z = unpackRobberHouses () robhouseMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) robhouseBlip = createBlipAttachedTo ( robhouseMarker, 32, localPlayer ) end addEventHandler ( "createHouseEvent", root, createHouses ) addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( source == robhouseMarker and not isPedInVehicle ( localPlayer ) and hitElement == localPlayer ) then triggerServerEvent ( "givePlayerPay", localPlayer ) destroyElement ( robhouseMarker ) destroyElement ( robhouseBlip ) triggerEvent ( "createHouseEvent", localPlayer ) playSound ( "files/cash.mp3", false ) end end ) addEventHandler ( "onClientPedDamage", resourceRoot, function () cancelEvent () end )
  17. Monty

    mechanic script

    sorry for twice postin... my error... no i didn't declare the variable... i don't how to do that... can help?
  18. Monty

    GUI error

    why when i open a gui any player in the server see it??? here the code client local marker = createMarker( 1787.5069580078, -1382.6146240234, 14.7578125, "Cylinder", 2, 41, 41, 41, 153) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"FBI agent") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take FBI team job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function FBIjob(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, FBIjob) function FBIjobleave(leaveElement) if getElementType(leaveElement) == "player" then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, FBIjobleave) function joinTeam() triggerServerEvent("setFBI",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removeFBIWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removeFBIWindow, false) server: function createFBITeam () FBITeam = createTeam ("FBI", 41, 41, 41) end addEventHandler ("onResourceStart", resourceRoot, createFBITeam) function joinFBI() --- local gang = exports [ 'ROADgang' ]:getAccountGang ( getAccountName ( getPlayerAccount ( source ) ) ) --- if ( gang == "FBI" ) then setPlayerTeam(source,FBITeam) setElementModel(source,286) setElementData( source, "Occupation", "FBI", true ) outputChatBox("You are now an FBI agent.",source,0,255,0) end addEvent("setFBI", true) addEventHandler("setFBI",root,joinFBI)
  19. hi i made this script but don't work... what's wrong?? client-side: local marker = createMarker( 1037.8309326172, -1029.5063476563, 31.1015625, "Cylinder", 1.5, 255, 153, 0, 150) --- marker createMarker ( float x, float y, float z, [string theType, float size, int r, int g, int b, int a] ) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"mechanic job") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take mechanic job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function mecjob(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, mecjob) function mecjobleave(leaveElement) if getElementType(leaveElement) == "player" then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, mecjobleave) function joinTeam() triggerServerEvent("setMec",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removemecWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removemecWindow, false) addEventHandler("onClientPlayerDamage", localVehicle, function(attacker, weapon, bodypart, loss) team = getPlayerTeam(attacker) if (attacker and getElementType(attacker) == "player" and weapon == 42 and team and getTeamName(team) == "Mechanic") then cancelEvent() -- Cancels the damage cause by the spray if (not isTimer(pause)) then if (health < 99) then triggerServerEvent("mechanic:repair", localVehicle, attacker) -- Calls the Server Event pause = setTimer(function() end, 1000, 1) -- Makes a timer for the function so it won't fully heal in the first time end end end end server-side: createBlip ( 1036.1654052734, -1027.8570556641, 32.1015625, 27 ) function createMechanicTeam () mecTeam = createTeam ("Mechanic", 255, 153, 0) end addEventHandler ("onResourceStart", resourceRoot, createMechanicTeam) function joinMec() setPlayerTeam(source,mecTeam) setElementModel(source, 50) giveWeapon ( source, 42, 999 ) setElementData( source, "Occupation", "Mechanic", true ) outputChatBox("You are now Mechanic.",source,0,255,0) end addEvent("setMec", true) addEventHandler("setMec", root, joinMec ) addEvent("mechanic:repair", true) addEventHandler("mechanic:repair", root, function (mechanic) if (getElementHealth(localVehicle) < 100) then local Heal = getElementHealth(localVehicle) + 10 -- New health setElementHealth(localVehicle, Heal) if (Heal > 100) then setElementHealth(localVehicle, 1000) end givePlayerMoney(mechanic, 1000) -- Gives 100$ to the medic each time the function is executed end end
  20. i would have done it if you hadn't said that it was for CIT
  21. Monty

    weapon ao

    is it possible to change the animation of a weapon? if YES what's the code? should i use setWeaponProperty?
  22. hi i made this script but don't work... what's wrong?? client-side: local marker = createMarker( 1037.8309326172, -1029.5063476563, 31.1015625, "Cylinder", 1.5, 255, 153, 0, 150) --- marker createMarker ( float x, float y, float z, [string theType, float size, int r, int g, int b, int a] ) GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} function guiMyCwindow(w,h,t) local x,y = guiGetScreenSize() return guiCreateWindow((x-w)/2,(y-h)/2,w,h,t,false) end windowjob = guiMyCwindow(301,250,"mechanic job") guiSetVisible(windowjob, false) GUIEditor_Button[1] = guiCreateButton(22,200,108,35,"Take job",false,windowjob) GUIEditor_Label[1] = guiCreateLabel(193,-103,5,5,"",false,windowjob) GUIEditor_Button[2] = guiCreateButton(179,200,110,36,"Cancel",false,windowjob) GUIEditor_Memo[1] = guiCreateMemo(19,33,273,100,"To take mechanic job, press Take job.\n\nIf you don't want to, press Cancel.",false,windowjob) guiEditSetReadOnly(GUIEditor_Memo[1],true) function mecjob(hitElement) if getElementType(hitElement) == "player" then if not guiGetVisible(windowjob) then guiSetVisible(windowjob, true) showCursor(true) end end end addEventHandler("onClientMarkerHit", marker, mecjob) function mecjobleave(leaveElement) if getElementType(leaveElement) == "player" then if guiGetVisible(windowjob) then guiSetVisible(windowjob, false) showCursor(false) end end end addEventHandler("onClientMarkerLeave", marker, mecjobleave) function joinTeam() triggerServerEvent("setMec",localPlayer) guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[1] , joinTeam, false) function removemecWindow() guiSetVisible(windowjob, false) showCursor(false) end addEventHandler("onClientGUIClick", GUIEditor_Button[2] , removemecWindow, false) addEventHandler("onClientPlayerDamage", localVehicle, function(attacker, weapon, bodypart, loss) team = getPlayerTeam(attacker) if (attacker and getElementType(attacker) == "player" and weapon == 42 and team and getTeamName(team) == "Mechanic") then cancelEvent() -- Cancels the damage cause by the spray if (not isTimer(pause)) then if (health < 99) then triggerServerEvent("mechanic:repair", localVehicle, attacker) -- Calls the Server Event pause = setTimer(function() end, 1000, 1) -- Makes a timer for the function so it won't fully heal in the first time end end end end server-side: createBlip ( 1036.1654052734, -1027.8570556641, 32.1015625, 27 ) function createMechanicTeam () mecTeam = createTeam ("Mechanic", 255, 153, 0) end addEventHandler ("onResourceStart", resourceRoot, createMechanicTeam) function joinMec() setPlayerTeam(source,mecTeam) setElementModel(source, 50) giveWeapon ( source, 42, 999 ) setElementData( source, "Occupation", "Mechanic", true ) outputChatBox("You are now Mechanic.",source,0,255,0) end addEvent("setMec", true) addEventHandler("setMec", root, joinMec ) addEvent("mechanic:repair", true) addEventHandler("mechanic:repair", root, function (mechanic) if (getElementHealth(localVehicle) < 100) then local Heal = getElementHealth(localVehicle) + 10 -- New health setElementHealth(localVehicle, Heal) if (Heal > 100) then setElementHealth(localVehicle, 1000) end givePlayerMoney(mechanic, 1000) -- Gives 100$ to the medic each time the function is executed end end
×
×
  • Create New...