Jump to content

Timic

Members
  • Posts

    169
  • Joined

  • Last visited

Everything posted by Timic

  1. Timic

    Fast Question.

    When you're loading the files it is 0,0,0. EDIT: It is right answer? I'm not too sure if I understand your question
  2. Timic

    Map Eror

    Just remove the spaces for example 'file test.zip' must be 'filetest.zip'. It is same for .map file.
  3. Answer on #4: function setBlipColour(player) local attachedElements = getAttachedElements(player) local team = getPlayerTeam" class="kw2">getPlayerTeam(player) local r, g, b = getTeamColor(team) if attachedElements then for k,v in ipairs(attachedElements) do if getElementType(v) == "blip" then setBlipColor(v,r,g,b,255) end end end end function onSpawn() setTimer(setBlipColour,500,1,source) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn) P.S: I didn't test it (yet)
  4. You'll need to edit ip2c.lua in admin resource. I made it for you: --[[********************************** * * Multi Theft Auto - Trace Script * * admin_ip2c.lua * * Original File by lil_Toady * **************************************]] aCountries = {} function getCountry ( element ) local ip if type(element) == 'string' then ip = element else ip = getPlayerIP(element) end if ip == "script needs acl privileges" then return "script needs acl privileges" end if #split(ip,46) ~= 4 then return false end local ip_group = tonumber ( gettok ( ip, 1, 46 ) ) local ip_code = ( gettok ( ip, 1, 46 ) * 16777216 ) + ( gettok ( ip, 2, 46 ) * 65536 ) + ( gettok ( ip, 3, 46 ) * 256 ) + ( gettok ( ip, 4, 46 ) ) if ( not aCountries[ip_group] ) then loadIPGroup ( ip_group ) end for id, group in ipairs ( aCountries[ip_group] ) do if ( ( group.rstart <= ip_code ) and ( ip_code <= group.rend ) ) then return group.rcountry end end return false end function loadIPGroup ( group ) aCountries[group] = {} local node = xmlLoadFile ( "conf/ip2c/"..group..".xml" ) if ( node ) then local ranges = 0 while ( true ) do local range_node = xmlFindChild ( node, "range", ranges ) if ( not range_node ) then break end local rstart = tonumber ( xmlNodeGetAttribute ( range_node, "start" ) ) local rend = tonumber ( xmlNodeGetAttribute ( range_node, "end" ) ) local rcountry = xmlNodeGetAttribute ( range_node, "country" ) local count = #aCountries[group] + 1 aCountries[group][count] = {} aCountries[group][count].rstart = rstart aCountries[group][count].rend = rend aCountries[group][count].rcountry = rcountry ranges = ranges + 1 end xmlUnloadFile ( node ) end end addEventHandler("onPlayerJoin",root, function () if get("outputquitjoin") == "true" then outputChatBox('* ' .. getPlayerName(source) .. ' has joined the game ('..getCountry(source)..')', root, 255, 100, 100) end end ) addEventHandler('onClientPlayerChangeNick', g_Root, function(oldNick, newNick) outputChatBox('* ' .. oldNick .. ' is now known as ' .. newNick, 255, 100, 100) end ) addEventHandler('onClientPlayerQuit', g_Root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. reason .. ']', 255, 100, 100) end ) Replace it with 'ip2c.lua' in admin system
  5. Well, if proracer gives 'rights' to ProDMRac3r, he can have and change it but he can't change credits
  6. Lol this part of the forum is not for sharing scripts !! Steal scripts in this part of the forum is forbidden ! You can take the code from forum if you have problems with same script.
  7. Can you send the uncompiled file in puma-markers? (Puma-Markers.lua.compiled)
  8. Well, if is without [TAG] tag then should redirect it. Bad argument at redirect player!
  9. Hello, I saw in debug, it was bad argument. Why O_O? function checkPlayerOnJoin(player) if not (string.find(getPlayerName(source),"[TAG]")) then redirectPlayer(playerSource, "some ip", tonumber(some port)) --redirect the player end end addEventHandler("onPlayerJoin", getRootElement(), checkPlayerOnJoin) P.S: I put IP and port but anyway, it won't work
  10. I am just asking if there's function?
  11. Timic

    All razor maps.

    Author has gaved you permssions for posting this? I don't think so!
  12. How is the function/command to disable repairs, nitros....? I mean: When you pick it, your vehicle won't repair.
  13. sniper you copied the eXo Userpanel too iths the same And? He didn't steal.
  14. I am using SciTE, it is the best
  15. You mean in *.luac ? When I compile it, it creates new file. Yeah, like *.luac Btw, it is the best =D
  16. I am using SciTE for programming + compiling.
  17. function setCash ( sourcePlayer,cmd,who,amount) if ( not who and not amount ) then outputChatBox("*Use /setcash [Name] [amount]", sourcePlayer, 180, 0, 0 ) end local gived = getPlayerFromName ( who ) if not gived then gived = sourcePlayer end account = getPlayerAccount(gived) if not isGuestAccount ( account ) then local playerCash = getAccountData ( account, "data.cash" ) local success = setAccountData ( account, "data.cash", tonumber(playerCash)+tonumber(amount) ) if success then outputChatBox ( "Your cash has been setted.", gived ) outputChatBox ( "You've setted his cash.", sourcePlayer ) else outputChatBox("ERROR: Player is not connected", sourcePlayer, 180, 0, 0 ) end end end addCommandHandler ( "setcash", setCash ) Well, I didn't test it yet
×
×
  • Create New...