Jump to content

bandi94

Members
  • Posts

    1,037
  • Joined

  • Last visited

Everything posted by bandi94

  1. addEventHandler('onGamemodeMapStart', getRootElement(), function () outputChatBox(get("respawn")) end)
  2. Orange : we don't need your crap useless post's help or shut up and don't spam ----flag.lua exports.scoreboard:addScoreboardColumn('Home') function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Home",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) <meta> <script src="flag.lua" type="server" /> </meta>
  3. i am searching/trying to check if a map has "respawn" timelimited or none i need to know on every map start if the map is respawn or not how can i get the respawn value (timelimited/none) from meta i need something like if respawn=="none" then .... thx a lot
  4. local flag = exports.admin:getPlayerCountry ( source ) "source" must be a player ther is source bk i use it whit "onPlayerJoin" you can change source whit player or whaat you use ...
  5. it will set on ElementData a file (image) what dosen't exist and the dxDrawImage (scoreboard) will spam in debugscript 3 "dxDrawImage can't load file path" that's all use this https://wiki.multitheftauto.com/wiki/FileExists
  6. i am not shure but i think is something whit your meta file or your script , icon file contains in name some unexpected simbol like :,. "space" and more
  7. add this on line 705 (maybe you need to ad somewhere els bk your scoreboard is difrent) elseif column.name == "Pic" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) and set the flag like this notice that admin panel recognize some countryes for what he don't have flag's so you can put a check function to check if is a flag or not else if a country is whitout flag you will be spamed in debugscript whit dxDrawImage can't load file path local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Pic",":admin/client/images/flags/"..flag..".png") end
  8. bandi94

    Train System?

    its stop bk you have some client side script i think and when are no player's the script can't run (client side)
  9. make how i did it you wil find the line where you need to edit it copy and paste the setnext map function again under the original delete the admin right check and change the command from "nextmap" to something else ex> :buymapshot or what do you whan-t viewtopic.php?f=91&t=36226&hilit=+buy+map
  10. you forgot an "end" local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height) function createText ( ) local text="" local team = getTeamFromName("Aliens") local players = getPlayersInTeam (team) dxDrawText ( "Team:", 175, screenHeight - 98, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) for i,v in pairs (players) do text=text.." , "..getPlayerName(v) end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender. end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering)
  11. server side function admin () local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then setElementData(source,"admin",true) end end addEventHandler("onPlayerLogin",resourceRoot,admin) client side addEventHandler ( "onClientPlayerDamage", getRootElement (), function(attacker, weapon, bodypart, loss) if getElementData(source,"admin") then cancelEvent() end end)
  12. local text="" local team = getTeamFromName("Aliens") local players = getPlayersInTeam (team) dxDrawText ( "Team:", 175, screenHeight - 98, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) for i,v in pairs (players) do text=text.." , "..getPlayerName(v) end dxDrawText ( "Team:"..text, 175, screenHeight - 100, screenWidth, screenHeight, tocolor ( 255, 0, 0, 255 ), 1, "pricedown" )
  13. yes like this you put "(" but there you need to put "," after 0 local zomb = setTimer(createPed, 5000, 0 ,tonumber(skin),tonumber(x),tonumber(y),tonumber(z))
  14. The easiest for beginres is AccountData
  15. setTimer(createPed,5000,0,int modelid, float x, float y, float z)
  16. bandi94

    question.

    function invisible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, false) setElementAlpha(source, 0) destroyBlipAttachedTo ( source ) end end addCommandHandler ( "invis", invisible ) function visible(source) if ( hasObjectPermissionTo ( source , "function.kickPlayer", true ) ) then setPlayerNametagShowing(source, true) setElementAlpha(source, 255) destroyBlipAttachedTo ( source ) end end addCommandHandler ( "vis", visible ) function destroyBlipAttachedTo ( player ) local attached = getAttachedElements ( player ) if not attached then return end for index , attachedElement in pairs ( attached ) do if getElementType ( attachedElement ) == "blip" then if getElementAlpha(attachedElement)==255 then setElementAlpha(attachedElement,0) else setElementAlpha(attachedElement,255) end end end end
  17. bandi94

    question.

    when you call that function ? you need to call it when you make the pelyaer invisible or post all your script to can help you and you call it destroyBlipAttachedTo( player ) ---player or source or what you set on your function
  18. hm i have again a problem i don't have experience whit file's so i need a litel help i noticed that admin panel return's some countryes for which he don't have image's so i used fileExists to check but my problem is that the flag (image names are ) us.png,tr.png,ro.png ..... and the admin panel return US,TR,RO and the fileExists return false bk he chek RO.png and the file is ro.png is a way to solwe this? to don't rename all flag's bk are over 150 EDIT: i tricked it i aded it on client side bk on window's RO=ro on server side it don't work bk on linux RO and ro are not equal
  19. i am trying to set an image file to ElementData (player) i have a script(resource) there are the image's aded to meta ..... and i wanna set the to ElementData(player) and from another resource to can use dxDrawImage i have made the script : setElementData(........,"img.png") but on the other resource i get dxDrawImage can't load file it is possible to store a image (file) on element data and can draw it in another resource thx i need this bk i don't wanna put the images in the same resource
  20. yes i think that will do the jobb i can't test it right now bk i am not on a PC but i will test it soon as possible THX Mate !
  21. hmmm yes i see this image thing on a server but i don't know how you can do it but i am searching to i wanna do this whit country flags i read somewhere that you need to edit the scoreboard maybe is an easier way i don't know
  22. i don't know if is a bug or not but why you don't use guiSetEnabled only for that 2 button's ? don't use it for the window and done whit your problem (if i am right i use guiSetEnabled on a window and teh titel bar don't disapear)
  23. ok i know my english is not good so i will explain is steps: 1. hidra have heat seeking Rocket ,Rocket that follow the traget 2. I wanna make this for Hunter 3. ex. when you press ctrl button on hidra appear that green turning circle what is following the vehicle which was set as traget 4. now i need that "green turning circle" on my script so i thought to use dxDrawImage but for this i need x,y cordinates 5. how can i get for a vehicle that is on my screen the position's to can use dxDrawImage 6. if i use getElementPosition that return's x,y,z but i need x,y for dxDrawImage 7. I think now I've made to understand
×
×
  • Create New...