Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Castillo

    [Help] in GUI

    VIPDragon, use only English in this forum, you can post in your own language in "Other Languages" section. viewforum.php?f=117
  2. addEventHandler ( "onPlayerChat", root, function ( message, type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#00FF00[Moderator]-#ffffff" .. getPlayerName ( source ) .. ": " .. message, getRootElement(), r, g, b, true ) elseif isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Admin" ) ) and type == 0 then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#00FF00[Admin]-#ffffff" .. getPlayerName ( source ) .. ": " .. message, getRootElement(), r, g, b, true ) end end) Works fine here.
  3. I didn't miss anything, I just corrected his code, he didn't had that at all.
  4. Proba con esto: addEventHandler('onPlayerChangeNick', getRootElement(), function(oldNick, newNick) setTimer (setPlayerName, 1000, 1, source, removeColorCoding(newNick)) outputChatBox('#0fc0fcNICK: #ffffff' .. oldNick .. ' #0fc0fcis now known as #ffffff' .. newNick, getRootElement(), 255, 100, 100, true) end)
  5. That's because you must use the player's account name, not his nick name. addEventHandler ( "onPlayerChat" , root , function ( message , type ) if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(source)), aclGetGroup ( "Moderator" ) ) then cancelEvent ( ) local r, g, b = getPlayerNametagColor(source) outputChatBox ( "#00FF00[Moderator]-#ffffff" .. getPlayerName ( source ) .. ": " .. message, getRootElement(), r, g, b, true ) end end)
  6. addEventHandler("onResourceStart",resourceRoot, function () exports.scoreboard:addScoreboardColumn("exp") end) function rewardOnWasted ( killer ) local exp = getElementData(killer,"exp") if exp then setElementData(killer,"exp",tonumber(getElementData(killer,"exp"))+5) outputChatBox("Experience gained +5! total ".. tonumber(exp)+5,killer,255,255,0) triggerClientEvent ( killer , "playSound" , killer ) else setElementData(killer,"exp",5) triggerClientEvent ( killer , "playSound" , killer ) end end addEventHandler ( "onPlayerWasted", getRootElement(), rewardOnWasted )
  7. Is that hard to type this: exports.scoreboard:addScoreboardColumn("exp") ?
  8. Castillo

    [Help] in GUI

    I never said that? also, you'll need to trigger to server side to make this work, I just made a easier way to set permissions.
  9. -- remove color coding from string function removeColorCoding( name ) return type(name)=='string' and string.gsub ( name, '#%x%x%x%x%x%x', '' ) or name end function noColor () local oldNick = getPlayerName(source) setTimer(setPlayerName, 1000, 1, source, removeColorCoding (oldNick)) end addEventHandler("onPlayerJoin", getRootElement(), noColor) addEventHandler("onPlayerChangeNick", getRootElement(), noColor) onResourceStart no funciona asi, no puedes cambiar el nick de "getRootElement()", para eso necesitas un loop.
  10. function noColor () setPlayerName(source, removeColorCoding (getPlayerName(source))) -- le puse ipairs a la funcion, tambien puse en los argumrntos "name" como en el ejemplo de la grid list, pero nada.... end addEventHandler("onPlayerJoin", getRootElement(), noColor) addEventHandler("onPlayerChangeNick", getRootElement(), noColor) addEventHandler("onResourceStart", getRootElement(), noColor) Proba con eso.
  11. Castillo

    [Help] in GUI

    There's no "over sound", you need to make it on your own, you can use onClientMouseEnter, onClientMouseLeave for that. To set who can use what in the buttons you could use element data or, a server side table with the button name, example: local permissionTable = { ["Push"] = {"Moderator"}, ["Kick"] = {"SuperModerator"}, } addEvent("panel:Push",true) addEventHandler("panel:Push",root, function (client, target, buttonName) if not permissionTable[buttonName] then return end for index, permission in pairs(permissionTable[buttonName]) do if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)),aclGetGroup(tostring(permission))) then -- Your function here end end end That should work, not tested though.
  12. createTeam setPlayerTeam
  13. I think you should take a look at the admin panel by lil toady, has a country detector.
  14. Jesseunit, take a look at his post in this topic: viewtopic.php?f=91&t=35619
  15. I think you should use this: https://wiki.multitheftauto.com/wiki/Get ... ingVehicle
  16. Simple, 'source' is the element of the vehicle the player just exit. function abandonveh(veh) createBlipAttachedTo(veh, 55, getTeamFromName("Mechanic")) end function startvehtime() setTimer(abandonveh, 20000, 1, source) end addEventHandler ( "onVehicleExit", getRootElement(), startvehtime )
  17. Castillo

    Points System

    Here we don't accept requests, you can search in the MTA community though. https://community.multitheftauto.com/
  18. I don't think that guy is a scripter, why would he go everywhere saying "I'm a experienced scripter"? personally, I would never do that.
  19. A custom island is not a "script", that's more a MAP.
  20. I don't think you we're kidding, I know my English is not perfect, but it's not that bad either.
×
×
  • Create New...