-
Posts
563 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Stanley Sathler
-
Do you wanna set a random skin to a certain element? If yes, you can create a table containing all available skins: mySkins = { 111, 67, 1, 100, 10, 213 } --Create a table with available skins Later, use math.random() to get a random number and insert to mySkins[random_number]: mySkins = { 111, 67, 1, 100, 10, 213 } setElementModel(theElement, mySkins[math.random(1, #mySkins)])
-
Bom pessoal, já que essa categoria até hoje permaneceu-se inutilizada, tomei a liberdade para compartilhar o meu primeiro resource postado publicamente: https://community.multitheftauto.com/index.php?p= ... ls&id=4506 [x] Página totalmente descritiva, com tutorial de instalação e alguns screenshots para pré-visualização. [x] O script parou de receber atualizações. Sendo assim, sintam-se à vontade para modificá-lo, seja para uso próprio ou para correção de bugs. [x] Como já diz a própria descrição, o script não foi originalmente feito por mim. Apenas editei cada elemento referente à GUI (buttons, campos de texto, labels, etc.). O autor original encontra-se na descrição na comunidade. [x] Caso não tenham entendido sobre como proceder com a instalação, basta adicionar a linha no arquivo acl.xml <object name="resource.loginform" /> <!-- Se mudarem o nome do script, nao se esquecam de altera-lo aqui tambem --> [x] Qualquer problema ou solução referente ao script, sintam-se à vontade para postar aqui mesmo neste tópico. Atenciosamente, Stanley Sathler.
-
Joker, you must learn LUA! You're trying create a server and you don't know absolutely NOTHING about LUA. Everytime you're asking here for a script ready. - Jaysds, bro, don't make codes to Joker. If you read the other topics created by him, you'll see: he's a big lazy member. He don't want learn LUA, he don't want work.
-
Thank you for the reply, Multivan. =D
-
X-Shadow, your code won't work. You must change getVehicleOccupant() to getPedOccupiedVehicle(). The first function returns the player and the second returns the vehicle.
-
if ( weapon == 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26 or 27 or 28 or 29 or 30 or 31 or 32 or 33 or 34 or 35 or 36 or 37 or 38 or 39 or 40 ) WTF? It will be better, not? if (weapon =< 40) then
-
O que foi que o DNL disse no seu primeiro tópico sobre criar tópicos relacionados à scripting na categoria "Scripting" aqui do subfórum português? Mais atenção da próxima vez. - Vai precisar das funções: guiCreateStaticImage() --ou dxDrawImage() setTimer() shutdown()
-
getTickCount() I don't know, but I think it works for it.
-
Ah, uma pequena observação: nem sempre a variável "source" é o jogador. A variável é padrão e adota valores diferentes em diversas ocasiões. Se você é novo na "arte de scriptar", no começo isso será um pouco confuso, mas com a prática você vai se acostumando. E pode ter certeza que sempre estaremos de braços abertos para ajudar não só você como os demais.
-
E não se esqueça: quando postar códigos em Lua, use a tag ao invés de . Seja bem-vindo ao fórum! (:
-
Lazy member... the functions already were posted. P.S: Is not "whant", is "want". There's not letter "h".
-
How to Make Gate Opened Only when Group Member are near that
Stanley Sathler replied to Jokeℝ1472771893's topic in Scripting
Well, if is it, the necessary functions was already posted. -
If the function does not ask the rotation, you should not use. Anyway, at least you tried.
-
Thank you, Dwane. I'll try keep the work. =]
-
Attempt to Get 'length of field' ? ( a nil value )
Stanley Sathler replied to micheal1230's topic in Scripting
Ok, we know: the error is in line 22. But what the /debugscript 3 says? Please, post here. And if possible, also post here the table "skins" -
Yes, I agree with Alpha, Teteomar. You can ask here... but when do it, you must show us your code and show us that you tried. Some members come here and wanna a ready script, and it is very, very uncomfortable.
-
The log says: "Bad argument @ 'getAccountData' [Expected account at argument 1, got boolean]". It means your variable "playerAccount" have a boolean value. And "getAccount()" function returns false when the account data (username and password) can not be found. So, maybe your username and password can not be found.
-
Insert it in client-side script: local localVehicle = getPedOccupiedVehicle(localPlayer) This function returns the vehicle that player is in. P.S: I don't know if you do it, the script will works. But you must do it for the variable be declared. Do it and come back to say the result.
-
You made two same topics. It was an accident, I think, but be careful with this.
-
The "localVehicle" variable was declared?
-
Oh, I also had this question. Karthik, what did you do? Added the condition "and (hitElement == localPlayer)"?
-
How to Make Gate Opened Only when Group Member are near that
Stanley Sathler replied to Jokeℝ1472771893's topic in Scripting
Wait... do you wanna this script to put in a base for CIT Server? If yes, the CIT Server don't accept resources, only the .map file. Have you read the rules for "how to apply for a base" in CIT Forum? The resource is made by CIT team, you just must send the .map file. -
Ohhhh, I love you Jaysds. It's working now. *-* Thank you so much for the attention man.
-
@Jaysds, was not me, was wrote by X-Shadow. But I should have seen it, of course. Thx for the correction. @X-Shadow, oh, nice bro. Good luck with your scripts. (:
-
Erro console
Stanley Sathler replied to honda_aa's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Ok. =)
