Jump to content

Imposter

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by Imposter

  1. sorry, but what do you mean by "also when the resource starts, loop players and create them as well.", i dont understand, can you please teach me? Here is what I have so far, haven't tested it though. c_root = getRootElement() function createZone () playerZone = createColTube ( 0, 0, 0, 10.0, 100.0 ) attachElements ( playerZone, c_root, 0, 0, 0 ) outputChatBox ( "created", source ) end addEventHandler ( "onPlayerJoin", c_root, createZone ) addEventHandler ( "onResourceStart", c_root, createZone ) function zoneEnter () outputChatBox("A Player is in Your Zone!", c_root) end addEventHandler ( "onColShapeHit", playerZone, zoneEnter ) function giveMoney() for index, player in ipairs ( getElementsWithinColShape ( playerZone, "player" ) ) do givePlayerMoney( player, 5000 ) end end addEventHandler ("onPlayerWasted", c_root, giveMoney )
  2. Thanks, but one more thing, how can i make it do this process for every player? So it attaches the collision object to every player and when every player dies it does this?
  3. K, i got that part, now how do i give money to players in the collision object?? c_root = getRootElement() function createZone () playerZone = createColTube ( 0, 0, 0, 10.0, 100.0 ) attachElements ( playerZone, source, 0, 0, 0 ) end addCommandHandler ( "cz_cz", createZone ) function zoneEnter () outputChatBox("A Player is in Your Zone!", c_root) end addEventHandler ( "onColShapeHit", playerZone, zoneEnter ) function giveMoney() end addEventHandler ("onPlayerWasted", c_root, giveMoney )
  4. Hi, i need help with collisions.Here is what i want to acheive, when a player joins, a tubular collision is made around the person and attached to him, once other players enters that collision , it gives a warning to the original player, when the other players kills the original player, those players in the collision get money. How will i do this?? Please help.
  5. First things first, Im a BIG Fan of you and your great work for this community Ok, so my MTA Installation is in my "C:\Games\MTA San Andreas\" Folder and I have my MTASE in "C:\Games\MTA San Andreas\MTASE", my crash is not because of the server, but because of the MTA game client, im currently trying to find more bugs to report.. but I think this one is really important to fix, if you dont mind, did you code this in VB.NET or in C#.NET because if its vb.net i could help out EDIT: Oh yes, the updater is also bugged the updater says that there is an update and I have the latest version, it downloads an empty archive. I'm hoping you accept the offer of my help because i was just gonna start coding my own editor when i saw yours
  6. Hey 50p, just found a bug, it wont report it so i thought i should post it here, when you launch the client, it crashes and says the following System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(String fileName) at Core.CClient.LaunchMTAClient() at Script_Editor.fMain.startClientToolStripButton_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) You need to fix your process information before you launch the client, the process info needs +server 127.0.0.1 (or whatever the syntax is) or you could do it the more simpler way and auto associate it so this error wont happen, instead of writing multitheftauto.exe blah blah blah, write Shell(mtasa://127.0.0.1:22003) it will be more efficient. gotta luv .NET, and if you have time i need some help with a script in lua (i dunno lua that well, im more of a .NET Programmer)
  7. I understand that, but when do i create the collision object? do i need to put it in a function?what handler do i use for the function? could i use onVehicleEnter? here is what i have so far. function createZone () -- get the position of the source player local x, y, z = getElementPosition(source) -- create a collision object around the player local playerZone = createColTube ( x, y, z, 10.0, 100.0 ) -- attach the marker to the player with a vertical offset of 0 units attachElements ( playerZone, source, 0, 0, 0 ) -- tell player that its done outputChatBox("ITS DONE!!",source) end addEventHandler ( "onVehicleEnter", getRootElement(), createZone ) function zoneEnter () outputChatBox("Incomplete", source) end addEventHandler ( "onColShapeHit", getRootElement(), zoneEnter ) it only seams to work when i make it a command handler addCommandHandler ( "cz_cz", createZone ) instead of addEventHandler ( "onVehicleEnter", getRootElement(), createZone ) HELP??
  8. for the eventhandler to create the collision? please bear with me im a newb
  9. What kind of eventhandler do i use? onVehicleEnter??
  10. Thank you Solidsnake14, but i tried that and the game lags really hard when the player starts to move, would i use a timer to do this or is there a better method?? Oh i understand what you mean, what i did before was make a collision object and when the player moves, it removes the object and creates it again, thank you so much for your assisstance!!!!
  11. Hello guys, i'm new to scripting in lua (just started a few weeks ago) and I need some help with radius's. Let me explain in more depth. Let say there is a player E and the other players are in a separate team, how would I warn player E if the other players are in a nearby radius of 10m? and if player E dies, how would i be able to give money only players in the 10m radius if they are in a specific team? Can somebody please help me out? I've been trying to do this for a week now with no luck.
×
×
  • Create New...