Jump to content

karlis

Members
  • Posts

    1,314
  • Joined

  • Last visited

Everything posted by karlis

  1. setNametagColor does exactly that.
  2. EDIT: here it is --serverside! function process() local players=getElementsByType("player") for _,v in pairs(players) do processPlayer(v) end end function processPlayer(p) local Player=source or p local nick=getPlayerName(Player) local colorcode=nick:match("^#%x%x%x%x%x%x") if colorcode then local red,blue,green=getColorFromString(colorcode) setPlayerNametagColor(Player,red,blue,green) end setPlayerName(Player,nick:gsub("#%x%x%x%x%x%x","")) end addEventHandler("onResouceStart",getResourceRootElement(),process) addEventHandler("onPlayerJoin",getRootElement(),processPlayer) addEventHandler("onPlayerChangeNick",getRootElement(),processPlayer)
  3. karlis

    Gm image

    and where you want to place it?
  4. guess bug with getControlState()
  5. it does make sense.some functions/events have build in source argument, and if you define something else with it it overwrites. therefore, for example, you wont be able to know, what player triggered some event.
  6. yep, thats exactly what i was going to write today(had to go yesterday)...i guess no more need EDIT:i don't see a way that the button is enabled again?
  7. upload all the resource, and ill take a look.
  8. i guess you could just disable sprint button for few secs after it is held for longer then X ammount of seconds.
  9. means the texture is not loading 1)check your meta, filename and code for typos, they need to match. 2)check does the textures actually are inside the file. 3)check isn't the texture in other folder.
  10. karlis

    Anti_Hack Help

    karlis* your welcome.
  11. blip = createBlipAttachedTo (sourceP, 56) setElementVisibleTo ( blip, sourceP, false ) better don't use variable source, as it is sometime defined by defaults.
  12. karlis

    Maths

    math.deg() math.rad() these 2 functions converts between radians and degrees.
  13. yep thats what i meant, thnx _____ ty XX3, glad to see you too.
  14. type /debugscript 2 and watch is there any errors/warnings.
  15. server, and before that you have to use players=getElementsByType("player")
  16. retry now, fixed little thing^
  17. in lua you don't need to define variables, you just make them players = { } players[1] = true players[2] = false --or players = { true, false } but mta doesn't have build in player id system. so for all players table you need to use players = getElementsByType("player") for key,value in pairs(players) do --do what you want end
  18. karlis

    f

    why you give us 20$ if its just for learning? anyway the code requires heavy modification all i can say is that you should look into "for" loops closely.
  19. karlis

    Anti_Hack Help

    ban works better imo lol.
  20. you could check for debug, say what is chatbox output after running script. function replaceModel() local txd = engineLoadTXD("infernus.txd") if txd then outputChatBox("texture load sucessful") end local txtrep = engineImportTXD(txd, 411) if txdrep then outputChatBox("texture replace sucessful") end local dff = engineLoadDFF("infernus.dff", 411 ) if dff then outputChatBox("DFF load sucessful") end local dffrep = engineReplaceModel(dff, 411) if dffrep then outputChatBox("DFF replace sucessful") end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadcar", replaceModel ) also please use tags.
  21. karlis

    Uzi bug

    i think it supposed to be like this.
  22. karlis

    Gm image

    say where you want it to be(how much pixels from what corner) and ill try to fix it.
  23. very strange, it seems it IS defined before. probably i'm missing something obvious.
  24. in which script you added that snippet?
×
×
  • Create New...