Jump to content

Stanley Sathler

MTA Contributors
  • Posts

    563
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Stanley Sathler

  1. You can create a table with available persons: aPersons = { 111, 116, 10, 94 } --Change to ID Skins that you want And later, access the item using rand.math() setElementModel(getLocalPlayer(), math.random[#aPersons]) function joinHandler ( ) spawnPlayer (source, 1957, -2181, 14, 180, 99, 22) fadeCamera (source, true) setCameraTarget ( source, source ) end function greetPlayer ( ) aPersons = { 111, 116, 10, 94 } outputChatBox ( "Thanks for join" , source, 0, 159, 255 ) setElementModel(source, math.random[#aPersons]) end addEventHandler ( "onPlayerLogin", getRootElement(), greetPlayer ) -- Don't forget to put the rest of your original code I think it works.
  2. Not bad. But is for what? Is not a race map, so... is like a deposit? Useful to RPG, Roleplay, Freeroam...? Anyway, I liked it. Mainly the lights.
  3. Damn, I loved! Nice prices. Oh, and maybe is better if you change the canvas by Cufon to use customized fonts in your website.
  4. I'm sorry, but I can't understand your english so well. Can you explain better? If you wanna a resource to record your game, can use the script posted by IIYAMA.
  5. Beautiful themes! Nice colors, nice background... maybe so blue, but beautiful! Was based on Black versions (by Aibo)? Try use a more dark blue, and will be perfect (in my opinion). Keep up with the good work, dude. I'll wait for more works by you. (:
  6. Guys, let's suppose: I'm creating a RPG. In my RPG I'll create many objects like food tents (hot-dogs, ice-cream), chairs and tables, trees, etc. Just to "complete" the map, creating squares, gardens, etc. Maybe I also wanna create some markers, for example, to create a car shop (everybody will can see and enter in marker). What is most recommended: create using client-sided or server-sided?
  7. Stanley Sathler

    Help

    You can use a little shit, creating three variables (storing the coordinates of them) and getting the actual player position. So, you create some conditions to choice the more near coordinates. But it is a little hard x] So, maybe you can use as Jaysds said, using getDistanceBetweenPosition2D (or getDistanceBetweenPoints3D) (obs: I never tried use these functions)
  8. Pronto Bruno_Winchester, problema resolvido. Você agora precisa ou fazer por si mesmo as modificações, ou repassar as informações para seu amigo scripter. Race, ótima explicação, cara.
  9. Strange, Kenix. Because I made this code: function CreateVehicleCommand(source, command, VehicleName) local VehicleModel = getVehicleModelFromName(VehicleName) local PlayerX, PlayerY, PlayerZ = getElementPosition(source) local Vehicle = createVehicle(VehicleModel, PlayerX+2, PlayerY+2, PlayerZ) warpPedIntoVehicle(source, Vehicle) end addCommandHandler("CreateVehicle", CreateVehicleCommand) It works, bro. Here, I'm warped to the vehicle (server-sided).
  10. Register form? Anyway, TAPL said all.
  11. Kenix, we always must use a setTimer() to use warpPedIntoVehicle() ? Is more recommended? Or he must use only in this example?
  12. The SQLQuery return a table. So you access the first item from table (gang[1]) and the column (["gang"]). Is it, I think.
  13. Solidsnake, yes bro, I got it. I fixed my post, I had forgotten this detail.
  14. I guess is like this, not? local skins = { skin1, skin2, skin3 } skins[math.random(#skins)] -- Note: I used "{ }", and not "( )" in table declarations --- Forget, you fixed your post.
  15. Bom, então acho que o único jeito de conseguirmos resolver isso é estudando o recurso. Provavelmente há alguma função ou algum método lá presente pra solucionar essa questão. Você chegou a procurar e a encontrar alguma evidência? -- EDIT É o arquivo .COL que adiciona essa colisão no objeto? É que não entendo muito desses arquivos.
  16. Ahh sim Michael, entendi perfeitamente a questão dos underline's também. Pô cara, brigadão, sempre quis saber isso, haha.
  17. Yes, I can understand you. But if he wanna learn Lua, he must learn read the manual, don't you think? One love bro, Stanley Sathler.
  18. DNL, mas as colisões funcionam quando você carrega (em um servidor) o recurso enviado acima, ou funcionam também quando você usa o Map Editor?
  19. Ben_Wright, why do not you just posted the links to the Wiki? You said the same thing that Wiki.
  20. Se está fazendo um servidor com um amigo, está fazendo um servidor de MTA, hehe. Enfim, DNL, acho que ele não fez qualquer alteração no col de arquivo algum, visto que o problema dele já surge direto no Map Editor. Eu já tive um problema com a colisão de elementos, mas como na época desisti do projeto, nunca cheguei a resolver. Eu francamente não sei o que poderia lhe ajudar, Bruno, me desculpe. A propósito, notei que você está usando a versão 1.0.4. Talvez fosse melhor você atualizar (não que a atualização resolva o seu problema, porque nesse caso, permanecerá).
  21. Opa, muito bom, Michael! Admito que tive de reler uma ou duas vezes para entender, mas consegui. O que me falta agora é prática para tal, mas assim que possível estarei fazendo isso. A propósito, bem que você poderia escrever um pequeno texto explicando o uso de "_" em algumas funções, hein? Por exemplo, já vi você usando: for _, v in pairs(table) do -- Conteudo end Qual o objetivo do "_" (underline) acima? Você poderia escrever um texto explicando o uso deste também? Acho que muitos têm essa mesma dúvida, hehe. Um forte abraço, Stanley Sathler.
  22. I can't test now, but try this: setTimer( function ( ) local s = getTickCount( ) s = ( getTickCount() - s ) / 1000 local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) guiSetText(Label,string1) end, 1000, 0 ) If not work, so try this: setTimer( function ( ) local s = getTickCount( )s = ( getTickCount() - s ) / 1000 local string1 = string.format( "%02d(h)%02d(m)%02d(s)", s/3600, s%3600/60, s%60 ) guiSetText(Label,string1) end, 1000, 0 ) I just renamed the "string" variable to "string1".
  23. Please, use the [*lua][/lua] tags to post a Lua code. And use a good indentation, doing your codes more readable.
×
×
  • Create New...