Jump to content

xeon17

Members
  • Posts

    1,903
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xeon17

  1. I tried to edit Samp kill messages , to add vehicle pictures.. Extample i kill someone with a hunter there will be a hunter picture.. but it dosen't work. Nothing in debug. Script dosen't work nothing work now. local screen_maxX, screen_maxY = guiGetScreenSize() local icon1_centerX, icon1_topY = 0.84, 0.3 local icon_width, icon_height = 24, 24 local icon_sideMargin, icon_bottomMargin = 10, 5 local label_width, label_height = 200, 20 local label_font, label_topMargin = "default-bold", 3 local label_shadowColor = tocolor(12,12,12) local rows = 5 local rows_margin = icon_height + icon_bottomMargin local label1_leftX = screen_maxX * icon1_centerX - icon_width/2 - icon_sideMargin - label_width local label1_rightX = label1_leftX + label_width local label2_leftX = label1_rightX + icon_sideMargin*2 + icon_width local label2_rightX = label2_leftX + label_width local icon_leftX = label1_rightX + icon_sideMargin local icon_topY = screen_maxY * icon1_topY local root = getRootElement() local resourceRoot = getResourceRootElement() local killRow = {} local imagePath = { [0] = "icons/weapons/fist.png", [1] = "icons/weapons/brassKnuckles.png", [2] = "icons/weapons/golfClub.png", [3] = "icons/weapons/nightstick.png", [4] = "icons/weapons/knife.png", [5] = "icons/weapons/baseballBat.png", [6] = "icons/weapons/shovel.png", [7] = "icons/weapons/poolCue.png", [8] = "icons/weapons/katana.png", [9] = "icons/weapons/chainsaw.png", [10] = "icons/weapons/dildo.png", [11] = "icons/weapons/dildo.png", [12] = "icons/weapons/dildo.png", [13] = "icons/deathReasons/death.png", [14] = "icons/weapons/flowers.png", [15] = "icons/weapons/cane.png", [16] = "icons/weapons/grenade.png", [17] = "icons/weapons/tearGas.png", [18] = "icons/weapons/molotovCocktail.png", [19] = "icons/weapons/rocketLauncher.png", [20] = "icons/weapons/hsRocketLauncher.png", [21] = "icons/deathReasons/explosion.png", [22] = "icons/weapons/9mm.png", [23] = "icons/weapons/silenced9mm.png", [24] = "icons/weapons/desertEagle.png", [25] = "icons/weapons/shotgun.png", [26] = "icons/weapons/sawnoffShotgun.png", [27] = "icons/weapons/combatShotgun.png", [28] = "icons/weapons/microSmg.png", [29] = "icons/weapons/mp5.png", [30] = "icons/weapons/ak47.png", [31] = "icons/weapons/m4.png", [32] = "icons/weapons/tec9.png", [33] = "icons/weapons/countryRifle.png", [34] = "icons/weapons/sniperRifle.png", [35] = "icons/weapons/rocketLauncher.png", [36] = "icons/weapons/hsRocketLauncher.png", [37] = "icons/weapons/flamethrower.png", [38] = "icons/weapons/minigun.png", [39] = "icons/weapons/satchelCharge.png", [40] = "icons/weapons/detonator.png", [41] = "icons/weapons/spraycan.png", [42] = "icons/weapons/fireExtinguisher.png", [43] = "icons/deathReasons/explosion.png", [44] = "icons/weapons/goggles.png", [45] = "icons/weapons/goggles.png", [46] = "icons/weapons/parachute.png", [49] = "icons/deathReasons/rammed.png", [50] = "icons/deathReasons/helicopterBlades.png", [51] = "icons/deathReasons/explosion.png", [52] = "icons/deathReasons/fire.png", [53] = "icons/deathReasons/death.png", [54] = "icons/deathReasons/fall.png", [255] = "icons/deathReasons/death.png", [425] = "icons/vehicles/425.png", [432] = "icons/vehicles/432.png", [447] = "icons/vehicles/447.png", [464] = "icons/vehicles/464.png", [520] = "icons/vehicles/520.png", connected = "icons/connectStates/connected.png", disconnected = "icons/connectStates/disconnected.png" } function onClientResourceStart(resource) setBlurLevel(0) end addEventHandler( "onClientResourceStart", resourceRoot, onClientResourceStart) function renderClientKillPanel () if(getElementData(localPlayer,"inClassSelection")) then return end for r = 1, rows do if killRow[r] then dxDrawText( killRow[r]["killerName"], killRow[r]["killerNamePos"]["leftX"] + 1, killRow[r]["killerNamePos"]["topY"] + 1, killRow[r]["killerNamePos"]["rightX"] + 1, killRow[r]["killerNamePos"]["bottomY"] + 1, label_shadowColor, 1, label_font, "right" ) dxDrawText( killRow[r]["killerName"], killRow[r]["killerNamePos"]["leftX"], killRow[r]["killerNamePos"]["topY"], killRow[r]["killerNamePos"]["rightX"], killRow[r]["killerNamePos"]["bottomY"], killRow[r]["killerNameColor"], 1, label_font, "right" ) dxDrawImage( killRow[r]["reasonIconPos"]["leftX"], killRow[r]["reasonIconPos"]["topY"], icon_width, icon_height, imagePath[ killRow[r]["deathReason"] ] ) dxDrawText( killRow[r]["victimName"], killRow[r]["victimNamePos"]["leftX"] + 1, killRow[r]["victimNamePos"]["topY"] + 1, killRow[r]["victimNamePos"]["rightX"] + 1, killRow[r]["victimNamePos"]["bottomY"] + 1, label_shadowColor, 1, label_font ) dxDrawText( killRow[r]["victimName"], killRow[r]["victimNamePos"]["leftX"], killRow[r]["victimNamePos"]["topY"], killRow[r]["victimNamePos"]["rightX"], killRow[r]["victimNamePos"]["bottomY"], killRow[r]["victimNameColor"], 1, label_font ) end end end addEventHandler ( "onClientRender", root, renderClientKillPanel ) function unfuck(text) return string.gsub(text, "(#%x%x%x%x%x%x)", function(colorString) return "" end) end function showClientDeathMessage ( killerName, killerNameColor, deathReason, victimName, victimNameColor ) local firstRow = killRow[1] for r = 1, rows - 1 do killRow[r] = killRow[r + 1] end if type(killerNameColor) ~= "table" then killerNameColor = {255,255,255} end if type(victimNameColor) ~= "table" then victimNameColor = {255,255,255} end if firstRow then killRow[rows] = firstRow killRow[rows]["killerName"] = unfuck(tostring(killerName)) killRow[rows]["killerNameColor"] = tocolor( unpack(killerNameColor) ) killRow[rows]["deathReason"] = deathReason killRow[rows]["victimName"] = unfuck(tostring(victimName)) killRow[rows]["victimNameColor"] = tocolor( unpack(victimNameColor) ) else killRow[rows] = { ["killerNamePos"] = { leftX = label1_leftX, rightX = label1_rightX, topY = 0, bottomY = 0 }, ["reasonIconPos"] = { leftX = icon_leftX, topY = 0 }, ["victimNamePos"] = { leftX = label2_leftX, rightX = label2_rightX, topY = 0, bottomY = 0 }, ["killerName"] = unfuck(tostring(killerName)), ["killerNameColor"] = tocolor( unpack(killerNameColor) ), ["deathReason"] = deathReason, ["victimName"] = unfuck(tostring(victimName)), ["victimNameColor"] = tocolor( unpack(victimNameColor) ) } end if imagePath[ killRow[rows]["deathReason"] ] == nil then killRow[rows]["deathReason"] = 255 end if killRow[rows]["killerName"] == killRow[rows]["victimName"] then killRow[rows]["killerName"] = "" end local y = icon_topY for r = 1, rows do if killRow[r] then killRow[r]["killerNamePos"]["topY"] = y + label_topMargin killRow[r]["killerNamePos"]["bottomY"] = y + label_height killRow[r]["reasonIconPos"]["topY"] = y killRow[r]["victimNamePos"]["topY"] = killRow[r]["killerNamePos"]["topY"] killRow[r]["victimNamePos"]["bottomY"] = killRow[r]["killerNamePos"]["bottomY"] end y = y + rows_margin end end addEvent("showDeathMessage", true ) addEventHandler("showDeathMessage", root, showClientDeathMessage ) function killPanelTest() showClientDeathMessage( "oldPlayerName", { math.random(0,255), math.random(0,255), math.random(0,255) }, "disconnected", "", {0,0,0} ) for r = 2, rows - 1 do local c, nameLen, name1, name2 = 1, math.random(4,20), "", "" while c <= nameLen do name1 = name1 .. string.char( math.random(33,125) ) c = c + 1 end c, nameLen = 1, math.random(4,20) while c <= nameLen do name2 = name2 .. string.char( math.random(33,125) ) c = c + 1 end showClientDeathMessage( name1, { math.random(0,255), math.random(0,255), math.random(0,255) }, math.random(0,54), name2, { math.random(0,255), math.random(0,255), math.random(0,255) } ) end showClientDeathMessage( "newPlayerHere", { math.random(0,255), math.random(0,255), math.random(0,255) }, "connected", "", {0,0,0} ) end META: type="script" author="MX_Master" name="SA-MP's kill messages" description="Displays all kill messages like SA-MP" version="0.4.0" />
  2. xeon17

    Problem

    Problem solved , a moderator close the topic please.
  3. xeon17

    MTA - Crashing

    I found my old GTA CD and reinstalled , MTA not crashing anymore. ty
  4. xeon17

    Question

    How to check have the player a vehicle ? and if he have then to destroy the vehicle ?
  5. xeon17

    MTA - Crashing

    Crash Code: Today i updated my NVIDIA Driver , after i tried to play MTA and a hunter killed me , then i crashed and every time when i die i crash and can't play anymore. When i try to restart MTA I get this : I no remember i modificated the vehicle 518 , i losed my GTA CD , can someone give me the orginal files of vehicle id 518 (dff,txd) will this solve the problem? MTA Diag Pastebin : http://pastebin.mtasa.com/327667876 @EDIT - Tried to reinstall MTA 1.3.5 - Problem still exist.
  6. xeon17

    Question

    How i can save the radar area color in a accountdata ? it would be the most easier way , because i'm not so good at lua should i learn now sql & mysql ?
  7. xeon17

    Problem

    I give players a element data when they join event , after i want check all players on server and who have the element data , i can take his weapons. I really no know why it dosen't work.
  8. xeon17

    Pomoc oko scripte

    Pravim Community sa 5 servera , imam host i sve. Vec sam dva servera zavrsio ali nemam scriptera ni mappera u timu tesko je.
  9. xeon17

    Problem

    Aff impossible
  10. I seach a scripter for my server & community , he'll be in Admins team in team. And of course i'm ready to pay him , i need a scripter for some simple things. Who is interested write it in topic.
  11. xeon17

    Question

    I no understand how to save in a datebase , i no know MYSQL & SQL. Any extample or something ? i realy need this
  12. xeon17

    Question

    How i can save colors of radar areas ? on server restart/shutdown
  13. xeon17

    Problem

    Is here anyone who can help me ?
  14. xeon17

    Problem

    Is here anyone who can help me ?
  15. xeon17

    Problem

    Is here anyone who can help me ?
  16. xeon17

    Problem

    Nope.. here the full script on = "nao" function event (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then if(on == "sim")then outputChatBox("#FFF000[sERVER#FFFFFF Evento created, use #FF0000/devent#FFFFFF to close the Event!",thePlayer,255,255,255,true) else outputChatBox("#FFF000[sERVER]#FFFFFF Administator #FF0000"..getPlayerName(thePlayer).."#FFFFFF created a event, write #FF0000/irevento#FFFFFF to participate!",root,255,255,255,true) local x,y,z = getElementPosition(thePlayer) coisa = createMarker(x,y,z-1,"cylinder",2,0,255,0) dimen =getElementDimension(thePlayer) inte = getElementInterior(thePlayer) if(inte)then setElementInterior(coisa,inte) end if(dimen)then setElementDimension(coisa,dimen) end on = "sim" end else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't a admin to create a event!",thePlayer,255,255,255,true) end end addCommandHandler("cevent",event) function destruir (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then if(on == "nao")then outputChatBox("#FFF000[sERVER]#FFFFFF There isn't a event, use #FF0000/cevent #FFFFFF to create a event!",thePlayer,255,255,255,true) else destroyElement(coisa) outputChatBox("#FFF000[sERVER]#FFFFFF Administator #FF0000"..getPlayerName(thePlayer).." #FFFFFF Closed the event!",root,255,255,255,true) on = "nao" end else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't an admin to destroy a event!",thePlayer,255,255,255,true) end end addCommandHandler("devent",destruir) function irevento(thePlayer,cmd) takeAllWeapons ( thePlayer ) setElementData ( thePlayer, "Evento" , nil) setElementHealth ( thePlayer, 100 ) setPedArmor ( thePlayer, 100 ) local x,y,z = getElementPosition(coisa) if(on == "sim")then if(getPedOccupiedVehicle (thePlayer))then outputChatBox("#FFF000[sERVER]#FFFFFF Leave your vehicle to enter the event",thePlayer,255,255,255,true) else if(setElementPosition(thePlayer,x,y,z))then setElementDimension(thePlayer,getElementDimension(coisa)) setElementInterior(thePlayer,inte) outputChatBox("#FFF000[sERVER]#FFFFFF Welcome in the Event!",thePlayer,255,255,255,true) za,ze,zi = getElementPosition(thePlayer) else outputChatBox("#FFF000[sERVER]#FFFFFF There isn't a event created!",source,255,255,255,true) end if(za == x and ze == y and zi == z) then setElementPosition(thePlayer,za,ze,zi+1) end end else outputChatBox("#FFF000[sERVER]#FFFFFF There isn't a event created!",source,255,255,255,true) end end addCommandHandler("irevento",irevento) function Infor(thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then outputChatBox("#FFF000[sERVER]#FFFFFF - Commands for Event ",source, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/cevent#FFFFFF - To create a event [Administators]!",source, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/devent #FFFFFF- To close the event [Administators]!",source, 255, 255, 255, true) outputChatBox("#FFF000[sERVER]#FFFFFF #FF0000/irevento #FFFFFF- To enter the event [Players]!",source, 255, 255, 255, true) else outputChatBox("#FFF000[sERVER]#FFFFFF You aren't an admin to use this command",source,255,255,255,true) end end addCommandHandler ("event",Infor) function getWeapons ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then for _, events in ipairs(getElementsByType("player")) do local isPlayerInEvento = getElementData( events, "Evento" , nil ) if ( isPlayerInEvento) then takeAllWeapons (events) outputChatBox("#FFF000[EVENTO]#FFFFFF Weapons Deleted !",events, 255, 255, 255, true) end end end end addCommandHandler ("takeweapons",getWeapons)
  17. xeon17

    Problem

    No work nothing in debug.
  18. xeon17

    Problem

    I got a problem in my script , i'm tried to create a script who check is the player in event and if he is , then with a command script will take all his weapons.. setElementData ( thePlayer, "Evento" , nil) function getWeapons ( thePlayer ) local accountname = getAccountName (getPlayerAccount(thePlayer)) if (isObjectInACLGroup ( "user."..accountname, aclGetGroup ( "Admin" ) )) then local players = getElementType ( thePlayer ) == "player" for _, events in ipairs(players) do local isPlayerInEvento = getElementData( events, "Evento" ) if ( isPlayerInEvento) then takeAllWeapons (events) outputChatBox("#FFF000[EVENTO]#FFFFFF Weapons Deleted !",events, 255, 255, 255, true) end end end end addCommandHandler ("takeweapons",getWeapons) Bug: [2014-05-28 10:09:53] ERROR: event\iaan.lua:86: bad argument #1 to 'ipairs' (table expected, got boolean)
  19. I think the money on his hud show the wrong money .
  20. xeon17

    [HELP] Spawn

    Maybe he mean this addEventHandler("onPlayerWasted",root, function() local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("V.I.P")) then spawnPlayer(source,3227,-690,108) end end )
  21. xeon17

    Pomoc oko scripte

    Ti si mapper ? trebao bi mi mapper za moje servere otvaram 5 servera i forum , ali nemamo ni jednog Mappera.
×
×
  • Create New...