Jump to content

Rockstar23

Members
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Rockstar23

  • Rank
    Square
  1. It works but it's only returning "Racing" EDIT: Solved.
  2. So I did this: local rootElement = getRootElement() local screenWidth, screenHeight = guiGetScreenSize() -- Get the screen resolution function createText ( ) local playerX, playerY, playerZ = getElementPosition( getLocalPlayer() ) dxDrawText(modeName(playerData.mode), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) dxDrawText(modeName(playerData.mode), 44, screenHeight-43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function HandleTheRendering() addEventHandler("onClientRender",rootElement, createText) --
  3. Well i've been scripting like 5 different servers that all have different languages so I get jumbled up and dont know what im saying sometimes. That's why I really need help with this.
  4. Well i'm fourteen and don't like big words.
  5. Yes I mean something like that but I want it to stay. Sounds complicated. I don't like things being complicated.
  6. Is this what your looking for? http://community.mtasa.com/index.html?p ... ils&id=222
  7. im not looking for a free scripter, this job is pay'd That's not why he sent you that thread Read this part:
  8. Hey there, I was wanting to make a text above the players heads that shows what mode they are in but I am not very familiar with (I guess it's called 3D text) that kind of text. I already have a function called modeName that will return the name of the mode they are in but I don't know what to do to create the text. Sorry for this newbish question I am just new to MTA:SA scripting.
  9. Well actually I have a few commands that let you change the mode so it will check if there mode is 1 so then it will send them the message because mode 1 is freeroam and 2 is roleplaying 3 is racing.
  10. So I was wanting make it so when someone joined it would play a sound saying "User Joined" and anytime someone joins, the sound does not play. addEventHandler("onPlayerJoin", root, function() playerData = {} playerData.mode = 1; if mode == 1 then local joined = playSound("sounds/joined.wav") setSoundVolume(joined, 1) end outputChatBox('Welcome to our server', source, 0, 255, 0) outputChatBox('Your current mode is: '..modeName(playerData.mode)..'.', source, 0, 255, 0) end )
  11. Thanks man. Really appreciate it
  12. No I didn't test it cause I didn't think it would work
  13. Ok so I am new to scripting MTA:SA and I have scripted Squirrel, and Pawn, but I was wondering if this would work in LUA for MTA. playerData = {} function modeName(mode) ( 0 = Freeroam, 1 = Roleplay, 2 = Racing end ) addEventHandler("onPlayerJoin", root, function() playerData = {} playerData.mode = 0; outputChatBox('Welcome to our server', player, 0, 255, 0) outputChatBox('Your current mode is: '..modeName[playerData.role]..'.', player, 0, 255, 0) end ) If it doesn't work how would I go about doing something like that?
×
×
  • Create New...