Jump to content

Anubhav

Members
  • Posts

    2,277
  • Joined

  • Last visited

Everything posted by Anubhav

  1. local checkString = split( message, "" ) if checkString[ 1 ] == "/" and checkString[ 2 ] then local cmd = "" local args = {} local spaceDetected = false for i, v in ipairs( checkString ) do if i ~= 1 then if v ~= "" and spaceDetected ~= true then cmd = cmd..v end end end -- to make arugments do one more split with " " return executeCommandHandler( cmd, playerWhoWroteCommand, unpack ( args ) ) end you do the args.
  2. yes but I do not have knowledge of patterns. it should go good I would use split as it would be easier for me..
  3. Anubhav

    A question

    not to console, for that there is outputConsole (something like that)> It outputs the value to the debug. Pretty much same but the difference it outputs it to the debug.
  4. Anubhav

    Lobby

    you mean designing?
  5. you mean? executeCommandHandler split the string, get the first letter in that split, check if it is "/" then after that loop through the table (also if indexValue ~= 1) and use executeCommandHandler
  6. use tables. setElementData( bblablabla, "your_value", {r,g,b}) then you can use: unpack( getElementData ( blablabla, "your_value ) )
  7. Anubhav

    dxDrawLine

    You might want to change it's alpha every 4 seconds using setTimer.
  8. Dude wtf? I'm trying to help you. The row is created FOR BOTH COLUMNS which i'm trying to say you are creating extra rows for the money column. You need see: guiGridListSetItemText استخدم حدث وحط اسم اللاعب باللبل زي كذا: l = guiCreateLabel( x,y,width,height,getPlayerName(localPlayer),relative)
  9. Don't add different rowsfor cost. You are making more rows causing the gridlist to make more rays.
  10. It will. When you loop through every object and then loop through a table again. Actually, it is not that optimized and won't matter much.
  11. Which way have you tried can you share it ? The onClientPreRender. IT sometimes shows and sometimes doesn't.
  12. I'm not sure either. Contact Dealman.
  13. Well, I'd love to have it. But won't their be problems of 36 limit of coronas? But I tried it, and it just sometimes shows and sometime doesn't. Send me the script please, I would love to see it. (attachElements don't work so I used onClientPreRender)
  14. Dealman told (I am lazy to find that post) that there is a way. dxCreateRenderTarget something like that, and then dxSetRenderTarget and set the clear to true and it will destroy everything else not in render target.
  15. Add outputChatBox's and debug it.
  16. It actually returns nil if I'm right and not false. clanGrid = guiCreateGridList (5,8,392,228,false,clanTab) usernamePlayer = guiGridListAddColumn( clanGrid, "Username", 0.2 ) if getPlayerTeam( localPlayer ) then local team = getPlayerTeam( localPlayer ) for id,players in ipairs(getPlayersInTeam( team )) do local playerTeam = guiGridListAddRow ( clanGrid ) guiGridListSetItemText ( clanGrid, playerTeam, 1, getPlayerName ( players ), false, false ) end end maybe this should work
  17. use tables try sth like this, put my code after checking the object model. local id = {3113,980, --[[add more ids here]]} for i, v in pairs (id) do -- your code here -- if ID ~= v then etc.. end that will lag the server. looping for every id is not a good idea rather: local id = { [3113]=true, } if not v[id] then end
  18. https://community.multitheftauto.com/index.php?p ... s&id=10336 delete DONE
  19. Anubhav

    Tables

    is that an unfinished string or it's normal? 131931,3131,13131" my bad. thanks
  20. remove the if after or on line 4.
  21. great i never thought of that idea of ~= , ~= means different right? and == means equal , anywy going to test it , hope it works! EDIT: It wasn't working in the beginning but i optimized the script and did this: i switched the local ID = getElementModel (v) on the top and it managed to fix it. local objects = getElementsByType("object") for i, v in ipairs(objects) do local ID = getElementModel (v) if ID ~= 3113 then local x,y,z = getElementPosition(v) local xr,yr,zr = getElementRotation(v) setLowLODElement(v,createObject ( getElementModel(v), x,y,z,xr,yr,zr,true )) end end == means equal to ~= not equal to
  22. https://forum.multitheftauto.com/viewtopic.php?f=148&t=47889
×
×
  • Create New...