-
Posts
636 -
Joined
-
Last visited
Everything posted by 'LinKin
-
Hello, Have you seen some signatures that displays the player's stats? I've always wondered, how do they do that? Now I really want to learn how to make one. Do you know the steps? Thanks.
-
Ahh yes arezu. I hadn't noticed that! Thank you
-
Hello, How can I separate a string by a certain character. For example if I have SW_GMC_HD_SMTH How can I separate it to indepentent strings like SW, GMC, HD, SMTH. And also, how can I insert them in a table so that I can make a for loop trought it later. Thanks.
-
Hello, Race has a textlib.lua file which allows you to create dxTexts. It's like a library. I'm trying to export the function (dxText:create) but everything points that it's because of the name containing ':' that it is not working. I changed the function's name and restarted race resource, then it was a mess.. Didn't even start (Because some things already use the function (dxText:create) inside the race resource. Do you know how can I make the call work, even it it has 'illegal' charcters such as this ':' ? Thanks.
-
That's what I'm talking about. Is like if the client didn't fire the event.. I'm not sure about what's happening there
-
Hmm.. So what do you think the reason of this 'bug' is?
-
Thank you. Now "When I do triggerServerEvent, is the event heard in other scripts? Or just in the script where the event was fired." I ask this because I'm having a problem (like a small bug) with a script. Server-side Client-side * Lua tag wasn't working. And using code tag made it hard to read. The problem with that script is that sometimes, when the players are ready and are playing, the text is not removed from their screen.
-
Hello, I want to make a function server-side, so that it can be used by any resource I give access to without having to copy the function's implementation inside each resource. How can I do that? Also, When I do triggerServerEvent, is the event heard in other scripts? Or just in the script where the event was fired. Thanks.
-
From nametags.lua inside Race resource: --Draw our text local r,g,b = 255,255,255 local team = getPlayerTeam(player) if team then r,g,b = getTeamColor(team) end local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) Still the same.. Wierd
-
Hi. When using default-small font, if you have a low/medium resolution you'd be able to read the text normally. But if you have a big resolution you'd really have difficulties reading the text since it's going to be very very small.. Is there any way to increase the font's size according to the resolution? Thanks
-
Yes.. I did that @Jacob. @Madex. What do u mean? Isn't that for removing the colour codes?
-
Hello, Where can I modify the nametags? I want it to draw the player's nick according to the colour codes he has. Example: |SW|Lin#CCCCCCKin (|SW|LinKin) (As SW is an auto-team) At the moment the nick is drawn only with the team's color. But how can I add the other color codes that a player has? I tried changing nametags.lua in Race resource, and I added ,true to the dxDrawText line. But it's still the same Thanks.
-
Thanks
-
I currently have just 1 server in the VPS. And yesterday I could do this by starting the server using the screen feature (screen -dmS VPS1 ./mta-server) And now I can open the server's console by (screen -r SCREEN_ID) anytime. I'm wondering, whenever I want to open another server in the same VPS, do I do the exact thing I made for setting up the first one? and then just change the server's port in mta-server.conf? I tried to do it some days ago but I totally failed. The first server got kinda mixed with the new one.. (Changed the server's name, gamemode, etc...) But the resources were still there (not started but they were uploaded).
-
Yes, it's not correct, but still I don't want to set "-1.#IND" as the label's text. That's for making the kill to death ratio which is kills/deaths. But if the player has 0 deaths... I'll better make it myResult = kills instead of myResult = 0. Anyway, can I do this in one line? Just like when you do: local myResult = myTable[1] or 0. -- Also, How to change the labels' font with a loop? for _,theLabel in ipairs(getElementsByType("gui-label")) do guiSetFont(theLabel, "default-small") end Would it change the font of other resources' labels? Because I remember I did this once to change the font of some labels in the race resource, and it did work. (Despite it was a different resource (folder))
-
Hello, When you try to divide x/0 , it will return this string: -1.#IND So, when that happens, as I'm setting the result of the division as a label's text, I want to make it '0' instead of '-1.#IND'. I'm currently doing it this way: if tostring(myResult) == "-1.#IND" then guiSetText(myLabel, 0) else guiSetText(myLabel, myResult) end And I have 9 more lines like that. I was wondering if it is possible to make it 'easier', for example when you do local myResult = myTable[1] or 0 , so that I don't have extra lines. Thanks.
-
I've seen somewhere that when a player is downloading the resources etc.. There's a blackscreen with a text on it. Saying Please wait ..
-
Hello, I was wondering if there's a way to put an image or a text on the screen while the player is downloading. Instead of the blackscreen, also, is it possible to give a resource a priority? So that it starts before other resources. Thanks.
-
Ye.. well... That's kinda outdated. I've set up the server and I have it running normally. But now I was wondering, how can I open the MTA's Server Console again in PuTTy? Because I'm starting the server in the background so that it doesn't close when I exit PuTTy. But doing it this way, the console is not shown. Also. To install a 2nd server, I just have to follow the same steps? I tried some days ago but they got mixed.. (The 2 servers I created on it).
-
Ubuntu 12.4 64bit
-
Is is possible to draw this chart with dx functions?
-
Of course they change. It's based on 1st, 2nd, 3rd, 4th+ race rank. When you change between players, the chart of each one is different, thus it will download the new image.