Jump to content

Tomas

Members
  • Posts

    2,530
  • Joined

  • Last visited

Everything posted by Tomas

  1. Debe ser un problema del mod, intenta spawnearlo más arriba.
  2. No se para que defines 'localPlayer' en server-side, si no nos dices que es ese 'localPlayer' será dificil ayudarte.
  3. Tomas

    [HELP] Please

    You're blind dude... addEvent("onZombieWasted") addEventHandler( "onZombieWasted", getRootElement(), function (killer) killerName = getPlayerName(killer) killerName = string.gsub(killerName,"#%x%x%x%x%x%x","") killerName = string.gsub(killerName,"#%x%x%x%x%x%x","") weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=162,g=2,b=2},"Zombie"},getRootElement(),wr,wg,wb ) end)
  4. Tomas

    [HELP] Please

    Why do you need to loop all players when someone's join? addEvent("onZombieWasted") addEventHandler( "onZombieWasted", getRootElement(), function (killer) killerName = getPlayerName(killer) killerName = string.gsub(killerName,"#%x%x%x%x%x%x","") killerName = string.gsub(killerName,"#%x%x%x%x%x%x","") weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=162,g=2,b=2},"Zombie"},getRootElement(),wr,wg,wb ) end)
  5. Tomas

    Crouching

    Where is 'thePlayer' defined?
  6. Tomas

    Crouching

    Where are you triggering 'crouchOn' ?
  7. You're welcome, you should use 'getPlayerName' instead of 'getPlayerNametagText'
  8. Tomas

    Crouching

    And.. where is the event in your code?
  9. function CopKillerer() for k,v in ipairs (getPlayersInTeam (getTeamFromName("Policia Militar"))) do local PAcBagmenos = tonumber ( getElementData ( v, "Prisoes" ) ) if ( PAcBagmenos >= 0 ) and ( PAcBagmenos < 20 ) then local nameTag = getPlayerNametagText ( v ) setTimer(function() setPlayerNametagColor ( v, 10, 118, 240 ) if not string.find(nameTag,"[PMSC]-") == 1 then local Job = setPlayerName ( v, "[PMSC]-"..string.gsub(nameTag, "(%[)%d-]","").."" ) else local Job = setPlayerName ( v,string.gsub(nameTag, "(%[)%d-]","")) end end,2000,1) end end end setTimer ( CopKillerer, 1000, 0 ) A question, why are you using 'getPlayerNametagText' instead of 'getPlayerName' ?
  10. function CopKillerer() for k,v in ipairs (getPlayersInTeam (getTeamFromName("Policia Militar"))) do local PAcBagmenos = tonumber ( getElementData ( v, "Prisoes" ) ) if ( PAcBagmenos >= 0 ) and ( PAcBagmenos < 20 ) then local nameTag = getPlayerNametagText ( v ) setTimer(function() setPlayerNametagColor ( v, 10, 118, 240 ) local Job = setPlayerName ( v, string.gsub(nameTag, "(%[)%d-]","")) end,2000,1) end end end setTimer ( CopKillerer, 1000, 0 )
  11. You will have many problems between CentOS and MTA, I recommend you to switch to Ubuntu or Debian.
  12. Tomas

    Crouching

    addEventHandler("onClientPreRender",root,function() bool = isPedDucked(localPlayer) toggleControl("crouch", not bool) toggleControl("jump",not bool) end )
  13. Could you post here what do you have and what do you want? (Tags)
  14. function CopKillerer() for k,v in ipairs (getPlayersInTeam (getTeamFromName("Policia Militar"))) do local PAcBagmenos = tonumber ( getElementData ( v, "Prisoes" ) ) if ( PAcBagmenos >= 0 ) and ( PAcBagmenos < 20 ) then local nameTag = getPlayerNametagText ( v ) setTimer(function() setPlayerNametagColor ( v, 10, 118, 240 ) local Job = setPlayerName ( v, "[PMSC]-"..string.gsub(nameTag, "(%[)%d-]","").."" ) end,2000,1) end end end setTimer ( CopKillerer, 1000, 0 )
  15. function CopKillerer() for k,v in ipairs (getPlayersInTeam (getTeamFromName("Policia Militar"))) do local PAcBagmenos = tonumber ( getElementData ( v, "Prisoes" ) ) if ( PAcBagmenos >= 0 ) and ( PAcBagmenos < 20 ) then local nameTag = getPlayerNametagText ( v ) setTimer(function() setPlayerNametagColor ( v, 10, 118, 240 ) local Job = setPlayerName ( v, "[PMSC]-"..string.gsub(nameTag, "([%d-])","").."" ) end,2000,1) end end end setTimer ( CopKillerer, 1000, 0 )
  16. Tomas

    Weapon Icons

    Get the texture name and replace it with shaders.
  17. La rotación se puede evitar como lo expliqué arriba.
  18. En los últimos 3 argumentos coloca el xyz de como sería vista de una manera "ideal", osea de frente. (Estoy en el celular, no puedo explicaré explicarte mejor)
  19. https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs
  20. IF COL_LENGTH('table_name', 'column_name') IS NULL BEGIN ALTER TABLE table_name ADD [column_name] INT END Example taken from: http://stackoverflow.com/questions/8870 ... eady-exist
  21. ¿Para qué lo quieres en los dos sides? Te recomiendo usar el server-side, Server: addEventHandler("onPlayerJoin",root,function() setPlayerHudComponentVisible(source,"all",false) end ) Client: setPlayerHudComponentVisible("all",false)
  22. Usa el que te dí arriba, es server-side. ¿Para qué usas esa variable? No tiene sentido y todavía te faltó la 's' en la linea 5.
  23. Mods: https://community.multitheftauto.com/ind ... s&id=10930 https://community.multitheftauto.com/ind ... s&id=10929 https://community.multitheftauto.com/ind ... s&id=10928 DONE
×
×
  • Create New...