Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. ill check...waiting 4 more answers Yes, a resource needs rights to stopResource function, otherwise it will not work and will print error in console/debug window. addEventHandler( "onResourceStart", getResourceRootElement(), function( ) local resToStop = getResorceFromName( "mapmanager" ); if resToStop then stopResource( resToStop ); end end )
  2. I've always thought there is right-click menu... I'm 100% sure there was one. You may have that context menu problem if you add new file. Try to close the file and re-open it. Opening file solves problems with functions list not showing up and context menu. I'll look into it and probably fix it in the next release.
  3. 50p

    save weapons

    Extend your question (if that is a question) or explain more about what you mean.
  4. You have to walk first and then start the animation while walking. It doesn't work the other way around.
  5. Could you please explain what you mean by "right click" in the editor's topic, not here?
  6. #define doesn't exist in Lua.
  7. You can't use client-side functions/events inside server-side script! onClientGUIClick is a client event which you can't use in server-side script.
  8. That wouldn't be "native object". You do want Map Editor then. MTA doesn't allow you to change IPL files.
  9. Tell server that this file in a client-side file... Check the Meta.xml page (link in my signature)
  10. You can save team names in player's account data and load it when he logs back in. Here is a basic idea: addEventHandler( "onPlayerQuit", getRootElement(), function( ) local plrAcc = getPlayerAccount( source ); if not isGuestAccount( plrAcc ) then setAccountData( plrAcc, "teamname", getTeamName( getPlayerTeam( source ) ) ); end end ); addEventHandler( "onPlayerLogin", getRootElement( ), function( _, account ) local teamName = getAccountData( account, "teamname" ); if teamName then setPlayerTeam( source, getTeamFromName( teamName ) ); end end ); Keep in mind that you should do more checks, like if player is in team, if so, get the team's name, if not, don't do anything.. or when loading the data, you should also check if team exists (getTeamFromName would return false or nil if team didn't exist)...
  11. Once you start Map Editor, you have to start the resource that replaces the objects. Map Editor is nothing else than running server with map editor resources. So, make new resource, add script for replacing models to it, include the models/textures inside this resource and start it after you start map editor. It will replace your models and you'll be able to make your spawnpoints where you want.
  12. 50p

    keyState

    You can use bindKey which calls function when key is pressed and released. You can start something when key is down and you can stop it once the key is released.
  13. In the first post you say you have already made one and now you ask to make it for you? myWindow = guiCreateWindow( 0, 0, 1, 1, "window", true );
  14. Which thePlayer did you change? The first one? You should use source (this is player element since onPlayer... events give you player element in source variable) in your getPlayerName() call.
  15. 50p

    Bad Arguement

    Don't declare variable with name of players! It will cause problems if player name contains other characters than numbers or letters. Just make global table and use player element as its index. Besides, the code you showed us doesn't contain any _G which is your error.
  16. I'm not sure how to do it in ZModeler but in 3ds Max you just select what polygons you want to be as separate object and detach them from the original object (their pivot points stay in the same position as the original model). Maybe that's the same way you do it in ZModeler.
  17. 50p

    Don't works

    local skin = 1; local skin = skin + 1;
  18. 50p

    Don't works

    You shouldn't declare the same variable twice. It's confusing for reader (including author).
  19. Guys, read the first post again... First post was not edited yet, so, it must have been there all the time. Anyway, I don't know what it looks like (no screenshots ) but from robhol's reply it seems to be "EXTREMELY early draft". If you'll spend loads of time on this, you may eventually get it as big as Unofficial MTA Script Editor or even larger but if you want it to happen you must spend most of your free time programming it (I know for a fact). Due to lack of time I don't program as much as half year ago I wish you luck though.
  20. 50p

    Gridlist^^

    You better stop copy'n'pasting code from one resource to yours... These errors are deadly simple but scripts look more complicated than these errors. I suggest you learn some Lua from other resources. Also, if you want to copy and paste the code from other resources, I'd recommend you rewrite the code instead of copying it since you learn more from typing code up than from copying it. You should also get error/warning message when you start this script (use "/debugscript 3" command to see error/warning messages for client-side scripts as well as for server-side scripts) since you don't have playerList defined anywhere in the code but you try to attach event handler to it. Change playerList (line 28) to Liste and add ",false " after click (the same line).
  21. You have weird problem there. Lets start from the beginning.. You have given your resource access to startResource, reloaded ACL and even restarted server.. That doesn't help? Does your script outputs error messages? Tried "refreshall" command? Your resource is not special in any way and it should have access to startResource function if you add it to admin group in acl.xml.
  22. source of onVehicleEnter is vehicle element of the vehicle that was entered.
×
×
  • Create New...