Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You say that now, but in another topic you said this: "you too i dont know anything of what you say your english too man lett me understand you"
  2. Castillo

    Help!

    Try this: function onResourceStart() call(getResourceFromName("scoreboard"), "addScoreboardColumn", "Online Time") for index, player in pairs (getElementsByType("player")) do setElementData (player, "joinTime", getTickCount() ) setElementData (player, "Online Time", "0 hours, 0 minutes, 0 seconds" ) end end addEventHandler("onResourceStart",resourceRoot,onResourceStart) function joinTime() setElementData (source, "joinTime", getTickCount() ) setElementData (source, "Online Time", "0 hours, 0 minutes, 0 seconds" ) end addEventHandler ( "onPlayerJoin", root, joinTime ) function all() for index , player in ipairs ( getElementsByType ( "player" ) ) do local s = getElementData(player,"joinTime") or getTickCount() s = (s - getTickCount()) / 1000 local string = string.format("%02d hours, %02d minutes, %02d seconds", s/3600, s%3600/60, s%60) setElementData(player,"Online Time",string) end end setTimer(all,1000,0) I think SDK missed a "d" in " %02d minutes"
  3. That's because the color codes aren't enabled. addEventHandler ( "onPlayerChat" , root , function ( message , type ) if hasObjectPermissionTo ( source , "function.banPlayer" ) then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#ff0000admin" .. getPlayerName ( source ) .. ":" .. message, getRootElement(), r, g, b, true ) end end)
  4. Castillo

    [Help] in GUI

    Maybe try setting the property AwalysOnTop to the buttons. guiSetProperty(myButton, "AlwaysOnTop", "True")
  5. Castillo

    Help!

    Yes, but the way you ask for help is not right, you are like telling us to FIX it
  6. function setTeam() local account = getPlayerAccount(source) local team = getAccountData (account, "team") if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) end end addEventHandler("onPlayerLogin",root,setTeam) function save(player) local team = getPlayerTeam(player) local account = getPlayerAccount(player) if (team) and not isGuestAccount(account) then setAccountData(account, "team", getTeamName(team)) end end addCommandHandler("saveteam",save) Try that, should work.
  7. Maybe you didn't understood me because you don't know English that good? I vote for that. P.S: I'm Argentinian, my english won't be perfect, I learnt it by my own.
  8. If I'm right, I've sent a pm to you RedBull, I didn't get a response, that's not the way to get a Scripter.
  9. Castillo

    Help!

    What does that mean? because what I get is that we're your "slaves" and we have to fix it for you, I think you're WRONG, why don't you try to fix it yourself?
  10. MORJM, I won't sound rude but, your explanation makes totally no sense for me, I don't know if it's because of your English, but I didn't get anything of it.
  11. I think he's talking about nametags with color codes, example if you have a HEX color #00FF00Solidsnake14 it'll be GREEN, and if you have #00FF00Solid#FF0000snake14 it'll be GREEN-RED.
  12. This server died long time ago, I don't think it's coming back.
  13. Why would JR10 do it? he's not asking for this, if the topic creator want's it, he should script it himself.
  14. Car mod: https://community.multitheftauto.com/ind ... ls&id=2831
  15. Well, if you take a look in here: https://wiki.multitheftauto.com/wiki/Main_Page you'll see this: Client Functions Client Events Server Functions Server Events Some functions/events are only client side same for the server side functions/events. Example: kickPlayer is only server side, so in the script type must be "server" Another example: guiCreateWindow is only client side, all GUI/DX drawing functions are only client side, type must be "client". Sorry if you didn't get me, I'm not good when it comes to explain things.
  16. That's a mess, that'll never work that way. Server side: function getCurrentMap() local mapmanager = getResourceFromName("mapmanager") local name = call(mapmanager,"getRunningGamemodeMap") triggerClientEvent(source,"returnCurrentMap",source,name) end addEvent("getCurrentMap",true) addEventHandler("getCurrentMap",root,getCurrentMap) Client side: glp = getLocalPlayer() bindKey("F3","down",function() window = {} sx,sy = guiGetScreenSize() window['main'] = guiCreateWindow((sx/2)-320,(sy/2)-240,640,480,"My window",false) window['map'] = guiCreateLabel(0.4043,0.8478,0.589,0.1425,"",true,window['main']) triggerServerEvent("getCurrentMap",glp) end ) addEvent("returnCurrentMap",true) addEventHandler("returnCurrentMap",root, function (currentMap) guiSetText(window['map'],currentMap) end) Try it.
  17. This resource: https://community.multitheftauto.com/index.php?p= ... ils&id=440 does that, you can change it's texture (.TXD file) and done.
  18. You welcome. P.S: You can't talk in any other language than English in this forum, you can use this section though to speak Spanish: viewforum.php?f=122 And, type="server" is to define if the script is server side or client side, if you take a look in the MTA wiki you'll see "Client functions, Client events", "Server functions, Server events", some functions only work client side or server side, that's the point for the script type(s). I'm when it comes to explaining .
  19. As far as I know, no so far, but you could do it yourself too, right?
  20. script.lua: function ResourceStart () for k,v in ipairs (getelementByType("player")) do setPlayerNametagShowing ( v, false ) end end addEventHandler ( "onResourceStart", resourceRoot, ResourceStart ) function PlayerJoin () setPlayerNametagShowing ( source, false ) end addEventHandler ( "onPlayerJoin", root, PlayerJoin) meta.xml: <meta> <script src="script.lua" type="server"/> </meta>
  21. Server side script: addEvent("onZombieWasted",true) addEventHandler("onZombieWasted",root, function (killer) givePlayerMoney(killer,100) addPlayerZombieKills(killer) end) function addPlayerZombieKills(killer) local account = getPlayerAccount(killer) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if not zombieKills then setAccountData(account,"Zombie kills",0) end setAccountData(account,"Zombie kills",tonumber(zombieKills)+1) end addEventHandler("onPlayerLogin",root, function () local account = getPlayerAccount(source) if isGuestAccount(account) then return end local zombieKills = getAccountData(account,"Zombie kills") if zombieKills then setElementData(source,"Zombie kills",tostring(zombieKills)) else setElementData(source,"Zombie kills",0) end end) Zombies resource already has a column in the scoreboard called "Zombie kills", this script should save the kills when they kill a zombie and then load on login.
  22. I doubt you'll find a free real scripter that'll just do it for being "Admin", I think you should either pay for one or learn by yourself. https://wiki.multitheftauto.com/wiki/Scr ... troduction
×
×
  • Create New...