Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Everything posted by 1LoL1

  1. function spawn (source) local players = getPlayerTeam(source) local team = getTeamName(players) if (team) == "Blue" then spawnPlayer (source, x, y, z, rotation, math.random (0,288), interior, dimension) -- blue spawn with random skin else spawnPlayer (source, x, y, z, rotation, math.random (0,288), interior, dimension) -- other spawn with random skin end end addEventHandler("onPlayerWasted", getRootElement(), spawn)
  2. 1LoL1

    [HELP] Update

    function health () local screenWidth, screenHeight = guiGetScreenSize() health = guiCreateLabel(screenWidth - 170, screenHeight - 15, screenWidth , 20, "", false) guiSetFont(health, "default-bold-small") end addEventHandler("onClientResourceStart", getRootElement(), health) function ste() local health2 = math.floor(getElementHealth(localPlayer)) guiSetText(health, ""..health2.."") end addEventHandler("onClientRender", getRootElement(), ste) Thanks works.
  3. 1LoL1

    [HELP] Update

    Thanks i used onClientRender work but label is created 50x function health () local health2 = math.floor(getElementHealth(localPlayer)) local screenWidth, screenHeight = guiGetScreenSize() local health = guiCreateLabel(screenWidth - 170, screenHeight - 15, screenWidth , 20, "", false) guiSetText(health, ""..health2.."") guiSetFont(health, "default-bold-small") end addEventHandler("onClientRender", getRootElement(), health)
  4. 1LoL1

    [HELP] Update

    lol function playerDamage (attacker) if (attacker and getElementType(attacker) == "player" and attacker ~= localPlayer) then -- guiSetText else -- guiSetText end end addEventHandler ( "onClientPlayerDamage",getLocalPlayer(), playerDamage ) I don't mean attacker.. but i want only update health in label..
  5. 1LoL1

    [HELP] Update

    But I think even when I jump out of something so it takes away my HP and still shows 100% and I jumped and I have 95%.
  6. 1LoL1

    [HELP] Update

    Hello, i created script but when anyone attacked me and taked Health of me i see always old Health. So my question is how i can update health in label? so i must use: setTimer setTimer(function() ? function health () local health2 = math.floor(getElementHealth(localPlayer)) local screenWidth, screenHeight = guiGetScreenSize() local health = guiCreateLabel(screenWidth - 170, screenHeight - 15, screenWidth , 20, "", false) guiSetText(health, ""..health2.."") end addEventHandler("onClientResourceStart", getRootElement(), health)
  7. Hello, my question is: How i can create metters, kilometers? i mean this: when player move so him will setElementData(metters) metters: 0,0 - 0,9 kilometters: 1-999999999999999999999999999999 but must with car can anyone please get me functions?
  8. 1LoL1

    [HELP] Please

    Hm .. thats weird. I edited the code above, replace your code with it and tell me if there are any errors in the debugscript. Again i see only image
  9. 1LoL1

    [HELP] Please

    Not work now i see: only Image
  10. If you want help so post script.
  11. 1LoL1

    [HELP] Please

    This work on 50% i don't see countryNames only image i see now: i need:
  12. 1LoL1

    Whats wrong?

    errors, warnings?
  13. 1LoL1

    [HELP] Please

    Have you checked the meta.xml of the admin resource and the flags folder ? Oh and are you sure that your scoreboard is made to draw the flag ? i used this code and work all so why not work my code? exports.scoreboard:addScoreboardColumn('Home') addEventHandler("onPlayerJoin", root, function () local country = exports.admin:getPlayerCountry(source) local flag = country and ":admin/client/images/flags/"..country..".png" setElementData(source, "Home", flag and {type = "image", src = flag, height = 12, width = 16} or "N/A") end)
  14. 1LoL1

    [HELP] Please

    I have latest but again i see only AR but not Image
  15. 1LoL1

    [HELP] Please

    Hello, why this my code not work? 0 errors 0 warning i see only AR but image not AR = Argentina i want to: AR please can anyone help me ? local countryNames = { ["IT"]="Italy", ["MX"]="Mexico", ["SA"]="SAUDI ARBIA", ["PK"]="Pakistan", ["AF"]="Afghanistan", ["DZ"]="Algeria", ["AS"]="American samoa", ["AU"]="Australlia", ["AO"]="Anqola", ["AI"]="Anquilla", ["AQ"]="Antarctica", ["AG"]="Antigua and Barbuda", ["AR"]="Argentina", ["AM"]="Armenia", ["AW"]="Aruba", ["AT"]="Austria", ["AZ"]="Azerbaijan", ["BS"]="Bahamas", ["BH"]="Bahrain", ["BD"]="Bangladesh", ["BB"]="Barbados", ["BY"]="Belarus", ["BE"]="Belgium", ["BZ"]="Belize", ["BJ"]="Benin", ["BM"]="Bermuda", ["BT"]="Bhutan", ["BO"]="Bolivia", ["BA"]="Bosnia", ["BH"]="Herzegovina", ["BW"]="Botswana", ["BR"]="Brazil", ["IO"]="British Indian Ocean Territory", ["VG"]="British Virgin Islands", ["BN"]="Brunei", ["BG"]="Bulgaria", ["BF"]="Burkina Faso", ["MM"]="Burma (Myanmar)", ["BI"]="Burundi", ["KH"]="Cambodia", ["CM"]="Cameroon", ["CA"]="Canada", ["CV"]="Cape Verde", ["KY"]="Cayman Islands", ["CF"]="Central African Republic", ["TD"]="Chad", ["CL"]="Chile", ["CN"]="China", ["CX"]="Christmas Island", ["CC"]="Cocos (Keeling) Islands", ["CO"]="Colombia", ["KM"]="Comoros", ["CK"]="Cook Islands", ["CR"]="Costa Rica", ["HR"]="Croatia", ["CU"]="Cuba", ["CY"]="Cyprus", ["CZ"]="Czech Republic", ["CD"]="Democratic Republic of the Congo", ["DK"]="Denmark", ["DJ"]="Djibouti", ["DM"]="Dominica", ["DO"]="Dominican Republic", ["EC"]="Ecuador", ["SV"]="El Salvador", ["GQ"]="Equatorial Guinea", ["ER"]="Eritrea", ["EE"]="Estonia", ["ET"]="Ethiopia", ["FK"]="Falkland Islands", ["FO"]="Faroe Islands", ["FJ"]="Fiji", ["FI"]="Finland", ["FR"]="France", ["PF"]="French Polynesia", ["GA"]="Gabon", ["GM"]="Gambia", ["GE"]="Georgia", ["DE"]="Germany", ["GH"]="Ghana", ["GI"]="Gibraltar", ["GR"]="Greece", ["GL"]="Greenland", ["GD"]="Grenada", ["GU"]="Guam", ["GT"]="Guatemala", ["GN"]="Guinea", ["GW"]="Guinea-Bissau", ["GY"]="Guyana", ["HT"]="Haiti", ["VA"]="Holy See (Vatican City)", ["HN"]="Honduras", ["HK"]="Hong Kong", ["HU"]="Hungary", ["IS"]="Iceland", ["IN"]="India", ["ID"]="Indonesia", ["IR"]="Iran", ["IQ"]="Iraq", ["IE"]="Ireland", ["IM"]="Isle of Man", ["IL"]="Israel", ["IT"]="Italy", ["CI"]="Ivory Coast", ["JM"]="Jamaica", ["JP"]="Japan", ["JE"]="Jersey", ["JO"]="Jordan", ["KZ"]="Kazakhstan", ["KE"]="Kenya", ["KI"]="Kiribati", ["KO"]="Kosovo", ["KW"]="Kuwait", ["KG"]="Kyrgyzstan", ["LA"]="Laos", ["LV"]="Latvia", ["LB"]="Lebanon", ["LS"]="Lesotho", ["LR"]="Liberia", ["LY"]="Libya", ["LI"]="Liechtenstein", ["LT"]="Lithuania", ["LU"]="Luxembourg", ["MO"]="Macau", ["MK"]="Macedonia", ["MG"]="Madagascar", ["MW"]="Malawi", ["MY"]="Malaysia", ["MV"]="Maldives", ["ML"]="Mali", ["MT"]="Malta", ["MH"]="Marshall Islands", ["MR"]="Mauritania", ["MU"]="Mauritius", ["YT"]="Mayotte", ["MX"]="Mexico", ["FM"]="Micronesia", ["MD"]="Moldova", ["MC"]="Monaco", ["MN"]="Mongolia", ["ME"]="Montenegro", ["MS"]="Montserrat", ["MA"]="Morocco", ["MZ"]="Mozambique", ["NA"]="Namibia", ["NR"]="Nauru", ["NP"]="Nepal", ["NL"]="Netherlands", ["AN"]="Netherlands Antilles", ["NC"]="New Caledonia", ["NZ"]="New Zealand", ["NI"]="Nicaragua", ["NE"]="Niger", ["NG"]="Nigeria", ["NU"]="Niue", ["NI"]="Norfolk Island", ["KP"]="North Korea", ["MP"]="Northern Mariana Islands", ["NO"]="Norway", ["OM"]="Oman", ["PK"]="Pakistan", ["PW"]="Palau", ["PA"]="Panama", ["PG"]="Papua New Guinea", ["PY"]="Paraguay", ["PE"]="Peru", ["PH"]="Philippines", ["PN"]="Pitcairn Islands", ["PL"]="Poland", ["PT"]="Portugal", ["PR"]="Puerto Rico", ["QA"]="Qatar", ["CG"]="Republic of the Congo", ["RO"]="Romania", ["RU"]="Russia", ["RW"]="Rwanda", ["BL"]="Saint Barthelemy", ["SH"]="Saint Helena", ["KN"]="Saint Kitts and Nevis", ["LC"]="Saint Lucia", ["MF"]="Saint Martin", ["PM"]="Saint Pierre and Miquelon", ["VC"]="Saint Vincent and the Grenadines", ["WS"]="Samoa", ["SM"]="San Marino", ["ST"]="Sao Tome and Principe", ["SA"]="Saudi Arabia", ["SN"]="Senegal", ["RS"]="Serbia", ["SC"]="Seychelles", ["SL"]="Sierra Leone", ["SG"]="Singapore", ["SK"]="SK", ["SI"]="Slovenia", ["SB"]="Solomon Islands", ["SO"]="Somalia", ["ZA"]="South Africa", ["KR"]="South Korea", ["ES"]="Spain", ["LK"]="Sri Lanka", ["SD"]="Sudan", ["SR"]="Suriname", ["SJ"]="Svalbard", ["SZ"]="Swaziland", ["SE"]="Sweden", ["CH"]="Switzerland", ["SY"]="Syria", ["TW"]="Taiwan", ["TJ"]="Tajikistan", ["TZ"]="Tanzania", ["TH"]="Thailand", ["TL"]="Timor-Leste", ["TG"]="Togo", ["TK"]="Tokelau", ["TO"]="Tonga", ["TT"]="Trinidad and Tobago", ["TN"]="Tunisia", ["TR"]="Turkey", ["TM"]="Turkmenistan", ["TC"]="Turks and Caicos Islands", ["TV"]="Tuvalu", ["UG"]="Uganda", ["UA"]="Ukraine", ["AE"]="United Arab Emirates", ["GB"]="United Kingdom", ["US"]="United States", ["UY"]="Uruguay", ["VI"]="US Virgin Islands", ["UZ"]="Uzbekistan", ["VU"]="Vanuatu", ["VE"]="Venezuela", ["VN"]="Vietnam", ["WF"]="Wallis and Futuna", ["WB"]="West Bank", ["EH"]="Western Sahara", ["YE"]="Yemen", ["ZM"]="Zambia", ["ZW"]="Zimbabwe" } exports.scoreboard:addScoreboardColumn ( "Country", getRootElement(), 9, 0.07 ) function wtf () local countryCode = exports.admin:getPlayerCountry(source) if countryCode and countryNames[countryCode] then local name = countryNames[countryCode] setElementData(source, "Country", name) else setElementData(source", Country", "N/A") end
  16. 1LoL1

    Help me on code

    What you need label or fix? if fix so post here warnings / errors if label guiCreateLabel
  17. 1LoL1

    Help

    fadeCamera() setCameraMatrix() ?
  18. If this mean you're really serious about idiot because no one will search for you scripts
  19. 1LoL1

    [HELP] Mission

    Can anyone help me please?
  20. 1LoL1

    [HELP] Mission

    if your code doesn't works i think is becouse your function have a native function name. Try to replace your function name call marker with markerJob, and tell me what about. if getElementData(thePlayer, "mission") == false then Have no sense imho, you can avoid it and left only destroy functions without If istruction. My code works normally but when i started resource then there is marker and blip and i want only when i use /job then blip and marker will be created. and when i finish mission or onMarkerHit blip and marker will destroyed.
  21. 1LoL1

    [HELP] Mission

    Hello i created my own script but i don't know how i can when player use /job so marker and blip will be showed only to who use /job. And next is please how i can fix this when i use /job so marker and blip will be created but how i can when i'am go onMarkerHit then marker and blip will be destroyed? /job --> Will be created Marker and Blip onMarkerHit --> Marker & Blip will be destroyed function job (source) marker1 = createMarker(-2708.6142578125, 1358.259765625, 7.0769176483154, "cylinder", 1.5, 255, 255, 0, 170) blip1 = createBlip(-2708.6142578125, 1358.259765625, 7.0769176483154, 0) setElementData(source, "mission", true) end addCommandHandler("job", job) function marker (thePlayer) local money = math.random(5000,15000) givePlayerMoney(thePlayer, money) setElementData(thePlayer, "mission", false) if getElementData(thePlayer, "mission") == false then destroyElement(marker1) destroyElement(blip1) outputChatBox("#00FF00Mission complete. You get "..convertNumber(money).."$!", thePlayer, 255, 255, 255, true) end end addEventHandler("onMarkerHit", marker1, marker)
  22. 1LoL1

    Help | team

    function team (source) local team1 = getPlayerTeam(source) local team2 = getTeamName(team1) if (team2 == "TEAM") then setElementPosition(source, x,y,z) -- if player is in team "TEAM" --> he will spawned on x,y,z elseif (team2 == "TEAM2") then setElementPosition(source, x,y,z) -- if player is in team "TEAM2" --> he will spawned on x,y,z else setElementPosition(source, x,y,z) -- if player is not in team --> he will spawned on next x,y,z end end addEventHandler("onPlayerWasted", getRootElement(), team) or function team (source) local team1 = getPlayerTeam(source) local team2 = getTeamName(team1) if (team2 == "TEAM") then setElementPosition(source, x,y,z) -- if player is in team "TEAM" --> he will spawned on x,y,z else setElementPosition(source, x,y,z) -- if player is not in team --> he will spawned on next x,y,z end end addEventHandler("onPlayerWasted", getRootElement(), team)
×
×
  • Create New...