-
Posts
563 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Stanley Sathler
-
How when the player join pick for him a specific persons ?
Stanley Sathler replied to Tete omar's topic in Scripting
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. -
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.
-
ColorHost - MTA 100 slots for $10.75!
Stanley Sathler replied to ColorHost-Kevin's topic in Hosting solutions
Damn, I loved! Nice prices. Oh, and maybe is better if you change the canvas by Cufon to use customized fonts in your website. -
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.
-
createObject() - Client-side or server-side?
Stanley Sathler replied to Stanley Sathler's topic in Scripting
Why, Xeno? -
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. (:
-
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?
-
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)
-
Ajuda. Oficina Mecanica MTA.
Stanley Sathler replied to Bruno_Winchester's topic in Programação em Lua
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. -
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).
-
Register form? Anyway, TAPL said all.
-
Kenix, we always must use a setTimer() to use warpPedIntoVehicle() ? Is more recommended? Or he must use only in this example?
-
No problem, FWCentral.
-
The SQLQuery return a table. So you access the first item from table (gang[1]) and the column (["gang"]). Is it, I think.
-
Solidsnake, yes bro, I got it. I fixed my post, I had forgotten this detail.
-
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.
-
Ajuda. Oficina Mecanica MTA.
Stanley Sathler replied to Bruno_Winchester's topic in Programação em Lua
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. -
Ahh sim Michael, entendi perfeitamente a questão dos underline's também. Pô cara, brigadão, sempre quis saber isso, haha.
-
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.
-
Ajuda. Oficina Mecanica MTA.
Stanley Sathler replied to Bruno_Winchester's topic in Programação em Lua
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? -
Ben_Wright, why do not you just posted the links to the Wiki? You said the same thing that Wiki.
-
Ajuda. Oficina Mecanica MTA.
Stanley Sathler replied to Bruno_Winchester's topic in Programação em Lua
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á). -
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.
-
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".
-
Please, use the [*lua][/lua] tags to post a Lua code. And use a good indentation, doing your codes more readable.
