Jump to content

Lordy

Members
  • Posts

    290
  • Joined

  • Last visited

Everything posted by Lordy

  1. Lordy

    Money pickup

    err.. What does the respawnTime = 30000 do there? That'd output syntax error I think Edit: You edited it nub norby89 now
  2. I somehow have a hunch that writing to any directory other than to clientside resources folder will not happen ever with MTA. Basically what you are asking Thehookerkiller01 is for MTA to modify another program.. Even when dp2.3 added MTA folder to San Andreas directory, it wasn't that good idea, but at least connecting to a server wouldn't change anything there. But you are asking that if you connect to a server, it would possibly damage/modify another installed program. That will not happen.
  3. Hmm.. No DaK, it wouldn't work. Firstly you define a function setPlayerBlipColor and then call it in the same function.. There's no setPlayerBlipColor function hardcoded in MTA, so you'd have to getAttachedElements, a loop and getElementType and then finally setBlipColor. And Callum's example is even more terrible.. You overwrite setBlipColour function and then call a nil value. Debugscript would have helped you, so please use it.
  4. robhol, but it is allowed Just tested with a lua binary function one() print(1) function two() print(2) end end I guess it's just declaring another variable inside the function. Would be the same if I did two = function() print(2) end But it does work that way and doesn't give errors And from the first glance his syntax seems to be nice, not like some other people around here (you know who robhol ) Now to helping part: It seems you started writing it all in one go and got lost while doing it. So first thing you need to do is rethink what you want to do and then do it correctly step by step. There aren't many steps involved here, but still it's easier to code this way. First, you need to think when and only when will you give money to killer. That means If a player got killed If the killer was in the colshape If the killed was in the colshape That means you need to add a function which triggers "onPlayerWasted" event (some function and an event handler to trigger it) warRadar = createRadarArea ( 1475.358, -1668.3005 , 78 , 118, 255, 0, 0, 175 ) -- your radar area warShape = createColCuboid ( 1442.970, -1718.917, -14, 73.66 , 113.233 , 500 ) -- your colcuboid function giveMoneyToKiller(totalAmmo,killer,killerWeapon,bodyPart) -- check the parameters on wiki, first one is not killer end addEventHandler("onPlayerWasted",getRootElement(),giveMoneyToKiller) Now you want to actually make the giveMoneyToKiller work. So you add checks to see if the player who got killed and the killer were both in the colshape -- inside giveMoneyToKiller if killer and source ~= killer then -- first you want to check if it's a suicide or something like that.. Don't give money then if isElementWithinColShape(source,warShape) and isElementWithinColShape(killer,warShape) then -- if both were in colshape givePlayerMoney(killer,5000) -- again, it's not giveMoney, it's givePlayerMoney, see [url=http://development.mtasa.com/index.php?title=GivePlayerMoney]http://development.mtasa.com/index.php? ... layerMoney[/url] end end Now you don't have to set the war area blinking because it would go blinking for everyone whenever anyone goes into it. I didn't test the code but it should work. If you don't understand why something goes where, feel free to ask. If you want adding the blinking then just again, make a function and event handlers pointing to it. Also you could use debugscript so you can find errors more easily http://development.mtasa.com/index.php?title=Main_Page http://development.mtasa.com/index.php?title=Debugging http://development.mtasa.com/index.php? ... troduction
  5. for starters check the function glueVehicle parameter list you got there
  6. Lordy

    send

    Client side outputChatBox has a bit different syntax. It outputs to local player only and thus there is no visibleTo argument. You'd need to trigger a server event to output to all players.
  7. Heavyair, no you were wrong. randomtable = {["key"] = "value"} means that randomtable["key"] == "value" Which means that if he defines randomtable[111] = true somewhere, then all he has to do is try if randomtable[vehicleID] is true. Eg he is doing it right there Only mistake I could find at the moment is that he's got the event name wrong It's "onPlayerVehicleEnter" not "onPlayerEnterVehicle"
  8. If you have the sounds, you can do it.
  9. in the function onJoin, the triggerClientEvent uses thePlayer, which is a nil value. You should use source there instead, since you haven't defined thePlayer anywhere. Also currently you comment out the triggerClientEvent ending bracket and there would go whatever the arguments you want to pass to the clientside function
  10. Then please pay attention what others say about it. Even if it were possible to achieve this with MTA without major problems, still it would be way too advanced stuff for you so you couldn't do it. And that's it.
  11. Well.. Isn't Vice City's dffs and txds with same format as San Andreas'? If so, you can replace the models with engine functions and build a vice city in some interior for example Maybe you'd need some conversion too.. Also you might get coordinates from vice city data files. Although this might prove a bit challenging since there's a custom objects streamer limit iirc.
  12. Also a bit more on 6. You could just make a login screen which triggers onPlayerJoin. Login screen has logging in and registering part. So if he's registered, force him to login, if not registered, force to register and login or leave the server.
  13. Most probably you are using triggerClientEvent and without it's first argument, eg you trigger it for everyone. Check wiki for triggerClientEvent syntax. But without any code of yours, we can't help more.
  14. Then go search again.. FYI, I just replaced a cop skin with a custom one with MTA.So it is possible.. engine functions and txd is the keyword here
  15. That is possible.. I'm not going to answer how though, check the wiki and see for yourself.
  16. It's possible with 1.0 map editor but iirc not with race editor
  17. The :~ of :~ is very :~ I think. Oh wait, actually, I don't mind RPG.. Maybe I'll stick around that test
  18. As you went afk from irc... I think this would go pretty well as a zombie skin now.. http://i299.photobucket.com/albums/mm28 ... s/temp.png Would need to replace skin id 280 [attachment=0]lapd1.zip[/attachment]
  19. But then think that none of the other racers don't have that drift handling so you have an unfair advantage. And IMO Phoenix, Elegy and Slamvan are perfect for drifting anyway. A bit harder with Super GT, but an experienced driver should cope with that too.. And all other cars are driftable too (think about Clover for example ).
  20. Probably https://community.multitheftauto.com/index.php?p=resources if it exists. Did a quick search there tho and nothing came up as player menu. Maybe you can be a bit more specific
  21. near fadeCamera I guess
  22. The todo list in the first post shows that it's planned
×
×
  • Create New...