Jump to content

The_Ex

Members
  • Posts

    66
  • Joined

  • Last visited

Everything posted by The_Ex

  1. I think this should work. Someone should correct me if it's wrong. flameWords = {"fuck", "bitch", "cocksucker"} function disallowFlame(message) for key, value in pairs(flameWords) do if string.find(string.lower(message), value) then outputChatBox("YOU HAVE BEEN WARNED!",source) -- do whatever you want here end end end addEventHandler("onPlayerChat", getRootElement(), disallowFlame)
  2. There is problem with destroying blips attached to already disconnected players... But you can call this function onPlayerQuit. It will loop through all the elements attached to player Element and destroy them. function blipDestroy(thePlayer) local blip = getAttachedElements ( thePlayer ) if ( blip ) then for ElementKey, ElementValue in ipairs ( blip ) do destroyElement ( ElementValue ) end end end EDIT: Well, you can also check for blips inside the function with getElementType but that's your choise.
  3. actually i got this one too with new editor
  4. i was talking about replacing handling for all players.
  5. Well, this would make racing more fun because you can use drift handling for drift races etc.
  6. Link works, i don't see any problems with that...
  7. The_Ex

    Need help

    Arris about that spawn in house... You can't just ask for code here. You have to learn both - code and search and in you can't find anything - then come here and ask for something.
  8. i'm using nightly builds, so it should work, huh? ordering(which is also 1.0 onwards) works fine for me.
  9. Didn't want to make new topic so i'll ask here. Does blip visibleDistance really work? I created some blips but visibleDistance doesn't work.
  10. Ok, i added id="[teamname]" for teams to .map file and used getElementByID(teamName) for getting the right team. Looks like it works fine but i'm still looking for better/easier solution if one exists.
  11. I'm pretty new to Lua code and all the MTA functions so i have one question about element data. For example i have declared team in .map file. How can i retrieve just one team data(by name) but not looping through all of them. Here's part of my code: function loadMap(startedMap) mapRoot = getResourceRootElement(startedMap) end local teamName = getTeamName(playerTeam) local team = getElementsByType("team", mapRoot) for key, value in pairs(team) do if(getElementData(value,"name")==teamName) then x = getElementData(value, "posX") ... end end
  12. nevermind, fixed updated all resources with SVN
  13. I downloaded and set nightly build with server. When i run server i get message that resource joinquit and parachute couldn't be found. So when i join server all i get is black screen but i can see chatbox and other resources running. So is this because of joinquit? I didn't see that resource in required neither optional folder.
  14. The_Ex

    1.0 server

    i have Platform SDK, i think so.Microsoft Platform SDK for Windows XP SP2 is it right? EDIT Included all libs but now i get ~200 errors like this. 1>TextureRenderer.lib(mtype.obj) : error LNK2001: unresolved external symbol _MEDIATYPE_Audio 1>MSVCRT.lib(crtdll.obj) : error LNK2001: unresolved external symbol __imp__InterlockedCompareExchange@12 1>MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp__UnhandledExceptionFilter@4
  15. The_Ex

    1.0 server

    why do i get linking error while compiling nightly build? LINK : fatal error LNK1181: cannot open input file 'strmiids.lib' Is there anything i have to change in configuration?
  16. The_Ex

    Custom vote

    I want to make vote about collision(known as ghostmode) when countdown starts. So players would choose either to race with or without collision but i don't know where to put that vote function call(on countdown or resource start or ??) and probably someone could give me code for vote function and correct vote call too because i don't know what value should i return. I'm new to Lua and my code kinda failed.
×
×
  • Create New...