Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. local reward = 200 function kill ( ammo, killer, killerweapon, bodypart ) local vehicle = getPedOccupiedVehicle ( killer ) local veh = getVehicleID(vehicle) if isPedInVehicle ( killer ) and veh == 425 then givePlayerMoney ( killer, reward ) outputChatBox ("#ff8800[REWARD] #ffffffYou have killed "..getPlayerName..( source )" ..and rewarded $".. tostring ( reward ), killer, 0, 255, 0, true ) end end addEventHandler ( "onPlayerWasted", getRootElement(), kill )
  2. Hello, can somebody tell me how i can make my own HTTP server and host files to it, So i can use fetchRemote to apply some mods, thanks. P.S: I tried working with Apache
  3. Thanks it's working but i have to aim in the head, Is it possible to make it without aiming? I mean once i hit him with katana he die..
  4. Wait is it client side? If yes then change the info in meta.xml to server side. It's working in my server without any bugs..
  5. Thank you TAPL and Citizen.
  6. Hello, can somebody see what's wrong here? It suppose to set the victim headless and die, but it wont work, no errors in debug script when i hit a ped or a player, thanks. addEventHandler("onPlayerDamage",root, function(killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then if weapon == 8 then setPedHeadless(killer, true) killPed(source,killer,weapon) end end end)
  7. ---------------do not change or touch this---------- Names={} Tags={} Colors={} ACL={} -------------------------------------------------------------- ---------------------------here put your clans read readme for instructions--------------------------------------- local names ={"Be The Best"} local tags ={"%[CP%]"} local colors ={"#00FF00"} local acls={"Admin"} --- put the acl name if you wanna check ACL group or "none" if you don't wanna check -------- load------------ function loadTeams() for i,name in pairs(names) do Names[i]=name end for i,tag in pairs(tags) do Tags[i]=tag end for i,color in pairs(colors) do Colors[i] = color end for i,acl in pairs(acls) do ACL[i] = acl end end addEventHandler("onResourceStart",getRootElement(),loadTeams) --------------------------------------------------- ----- move on start------------------ function moveOnStart() for i,player in pairs(getElementsByType("player")) do check(player) end end addEventHandler("onResourceStart",getRootElement(),moveOnStart) ------------------------------------------------------------------------- -----------check---------------------------- function check (player) setPlayerTeam(player,nil) for i,tag in pairs(tags) do if string.find(getPlayerName(player),tag) then local account=getPlayerAccount(player) if ACL[i]~="none" and not isObjectInACLGroup ( "user." ..getAccountName(account) , aclGetGroup ( ACL[i] ) ) then return end local name = Names[i] local color = Colors[i] if not getTeamFromName(name) then createTeam(name,getColorFromString(color)) end local team = getTeamFromName(name) setPlayerTeam(player,team) end end end -------------------------------- ----------remove Empty Team ---------- function remove() for t,teams in pairs(names) do local team = getTeamFromName(teams) if team then if countPlayersInTeam ( team )==0 then destroyElement(team) end end end end ----------------------------------------------------- -------NickChange------------- function nick(old,new) setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerChangeNick",getRootElement(),nick) --------------------------------------------- -------Join-------------------------------- function join() setTimer(check,4000,1,source) end addEventHandler("onPlayerJoin",getRootElement(),join) ------------------------------- ---------Quit--------------------- function quit(player) setTimer(remove,1000,1) end addEventHandler("onPlayerQuit",getRootElement(),quit) ------------------------------------ ---------Login--------------------- function login() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogin",getRootElement(),login) ------------------------------------ ---------Logout--------------------- function logout() setTimer(check,1000,1,source) setTimer(remove,1500,1) end addEventHandler("onPlayerLogout",getRootElement(),logout) ------------------------------------ ----------blip-------------- function blip(player) local team = getPlayerTeam(player) if team then for v,blip in pairs(getAttachedElements(player)) do if getElementType(blip)=="blip" then local r,g,b =getTeamColor(team) setBlipColor(blip,r,g,b,255) end end end end function timer() setTimer(blip,3000,1,source) end addEventHandler("onPlayerSpawn",getRootElement(),timer)
  8. Use Lua tags. and I think the problem is this local tags ={"[Cp]"} should be local tags ={"%[CP%]"}
  9. Hello guys, can somebody tell me how i can make these texts work in all resolution, I have no idea how to do that..Can somebody help? and thanks. dxDrawText("XP "..XP, 1214, 268, 1357, 320, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("XP "..XP, 1214, 266, 1357, 318, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("XP "..XP, 1212, 268, 1355, 320, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("XP "..XP, 1212, 266, 1355, 318, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("XP "..XP, 1213, 267, 1356, 319, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(""..LV, 1214, 284, 1357, 320, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(""..LV, 1214, 282, 1357, 318, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(""..LV, 1212, 284, 1355, 320, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(""..LV, 1212, 282, 1355, 318, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(""..LV, 1213, 283, 1356, 319, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) --Money dxDrawText(tostring (money), 1165, 28, 1350, 74, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText(tostring (money), 1165, 26, 1350, 72, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText(tostring (money), 1163, 28, 1348, 74, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText(tostring (money), 1163, 26, 1348, 72, tocolor(0, 0, 0, 255), 1.00, "pricedown", "left", "top", false, false, true, false, false) dxDrawText(tostring (money), 1164, 27, 1349, 73, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, true, false, false) --Image dxDrawImage(1162, 143, 145, 168, ":Ranks/rank/Rank_"..icon..".png")
  10. Hello, i have a problem here, when i try to chat in team chat, everybody can see the message that i wrote and same thing happening to other teams chat, If you don't understand what i mean, is that when i write in team chat, everybody can read the message like local chat, hope somebody help, thanks. function RGBToHex(red, green, blue) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255)) then return nil end return string.format("#%.2X%.2X%.2X", red, green, blue) end local function onplayerChat ( message, messageType ) if ( messageType == 2 ) then --Team (Clan) chat cancelEvent ( ) local name = getPlayerName ( source ) local red, green, blue = getPlayerNametagColor ( source ) local hex = RGBToHex ( red, green, blue ) outputChatBox( "#9AFE2E(CLAN)" .. hex.." "..name .. ":#FFFFFF" .. message, root, 255, 255, 255, true ) outputServerLog( "(TEAM): " .. name .. ": " .. message )--NOTE: Beacuse we cancelled the onPlayerChat event, we need to log chat manually. end end addEventHandler ( "onPlayerChat", root, onplayerChat ) function nickChangeHandler() if isPlayerMuted ( source ) then outputChatBox("You are muted.", source, 100, 0, 0) cancelEvent() end end addEventHandler("onPlayerChangeNick", getRootElement(), nickChangeHandler)
  11. Thanks anyway, i posted that code in forum but nobody helped, hope someone see what's wrong, or just show me how i can use fetchRemote. addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource ()), function () exports.download:downloadFile ("infernus.txd", "infernus.txd", 500) exports.download:downloadFile ("infernus.dff", "infernus.dff", 500) end) addEventHandler ("onClientDownloadComplete", getRootElement(), function (theFile) if theFile == ":/test/cars/infernus.txd" then local theTXD = engineLoadTXD ( theFile ) engineImportTXD ( theTXD, 411 ) elseif theFile == ":/test/cars/infernus.dff" then local theDFF = engineLoadDFF ( theFile, 411 ) engineReplaceModel ( theDFF, 411) end end)
  12. But how I can check when the player finish the Mta download and start downloading the car mods?
  13. Hello, can somebody help me how to use fetchRemote to download and apply some car mods(dff and txd) when player finish his current download, lie a background download so the player can play and download in the same time, thanks.
  14. Stolen Grafuroam nametag resource from client while downloading: https://community.multitheftauto.com/ind ... ls&id=9024 Edit: guys you should really ban that guy Stolen: https://community.multitheftauto.com/ind ... ls&id=8561 Original: https://community.multitheftauto.com/ind ... ls&id=4952 Again; Stolen: https://community.multitheftauto.com/index.php?p= ... ls&id=8551 Original: https://community.multitheftauto.com/index.php?p= ... ls&id=7113 DONE, USER BANNED
  15. Stolen Grafuroam resources (from client files): https://community.multitheftauto.com/index.php?p= ... ls&id=9017 https://community.multitheftauto.com/index.php?p= ... ls&id=9019 DONE
  16. I was missing around, and i was wrong it's creating on clients computers, but it don't apply the modded infernus
  17. I would like to use it, but i have no idea how to use it...Can you give me an example code? or just a topic that can help me.Thanks
  18. I have no idea how to use it, so i search in community and i found that resource.. Is there any topic that have the same problem? or explain how to use fetchRemote
  19. Sorry for posting in an old thread but can somebody see what's wrong here? addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource ()), function () exports.download:downloadFile ("infernus.txd", "infernus.txd", 500) exports.download:downloadFile ("infernus.dff", "infernus.dff", 500) end) addEventHandler ("onClientDownloadComplete", getRootElement(), function (theFile) if theFile == ":/test/cars/infernus.txd" then local theTXD = engineLoadTXD ( theFile ) engineImportTXD ( theTXD, 411 ) elseif theFile == ":/test/cars/infernus.dff" then local theDFF = engineLoadDFF ( theFile, 411 ) engineReplaceModel ( theDFF, 411) end end)
  20. No, btw I added both of the resource names on admin acl, i really don't know what's wrong..
  21. Warning:download/server fileOpen unable to load file Files path: cars/infernus.txd cars/infernus.dff cars/meta.XML And the here is the path of download resource download/client.lua download/server.lua download/meta.xml
×
×
  • Create New...