Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. 50p

    Save player team

    Can someone answer me: What's the point of using getPlayerAccount in onPlayerLogin event? People, think for a moment. Also, can you login to a guest account? I'm pretty sure the 2nd line is pointless. "it doesn't work" is as helpful to us as saying "Jump!" to a depressed person standing on a cliff.
  2. This will not give him the results that he wants.. He'll still have to use dxGetTextWidth.
  3. 50p

    Question about car

    If you want it to work on specific cars only then you can use element data. Use setElementData to set some specific data and then use getElementData to check if this specific data was set.
  4. Stop the freeroam resource or edit the script and remove the bindKey line which binds F1 to open/hide the window. Most of your questions are scripting related and you have to script it yourself. We understand you need help with making RP server but you have to script something first before we can help you with the scripting.
  5. 50p

    Variable

    @hemen You can't simply have a function which returns a server-side variable in client-side script, or the other way around... You have to trigger events back and forth.
  6. Even more efficient way: addEventHandler("onClientGUIClick",GUIEditor_Button[1],function() guiSetVisible(source,false) end,false)
  7. Use https://wiki.multitheftauto.com/wiki/DxGetTextWidth to get the text's width and draw the text half the width the text to the left of the head. Replace your dxDrawText with these 4: local scale = 0.85+(15-dist)*0.02; local playerName = getPlayerName( v ); local w = dxGetTextWidth( playerName, scale, "bankgothic" ); dxDrawText(playerName,x-w/2,y,x,y,tocolor(150,50,0),scale,"bankgothic")
  8. I don't get it... How can place move where you warp? Show some code and try to explain in more detail.
  9. It's for everyone. It was made to speed up resource creation process and check if your script has syntax errors before you test the resource on the server.
  10. 50p

    Question about car

    You want to compare model ID not an "ID" of a vehicle. Use getElementModel and compare the returned value with model ID of Sultan (iirc it's 560).
  11. G-TXD ??? omg o_O stupid program=\ The most advanced program for TXDs... TXD Workshop can't create TXD files because they are corrupted, it can only edit original texture archives.
  12. I suggest you use G-TXD.
  13. The variable has to be on the same side. You can't access variable from server-side script in a client-side script but you can access the client-side variable in another client-side script.
  14. mysql_query( connect_mysql, "SELECT * FROM 'players' WHERE charName='" .. getPlayerName( theUser ) .. "'" ) or even mysql_query( connect_mysql, "SELECT * FROM players WHERE charName='" .. getPlayerName( theUser ) .. "'" )
  15. https://wiki.multitheftauto.com/wiki/Ser ... _functions
  16. Check if your query with ' instead of ` will work.
  17. You can't remove the column header neither. You can try ColumnHeader property but I doubt it'll work like most GUI properties.
  18. You can't hide borders. You can't hide columns. Why do you want to hide columns? Why do you create them if you want to hide them? Why don't you simply remove them if you don't need them with guiGridListRemoveColumn?
  19. I think there was a type of explosion that was invisible... Maybe it was in SAMP era and it could have been a bug.
  20. 1. You have to iterate through all players and check if their name starts with the name that player entered (I'll call this parameter partOfName) for i, plr in ipairs( getElementsByType( "player" ) ) do if plr ~= playerWhoTypedCommand then -- make sure that currently iterated player is not player who typed command local start = string.find( getPlayerName( plr ), partOfName, 1, true ); -- check if partOfName was found in player name and if it was found at first character of the name if start and start == 1 then -- player name starts with the partOfName outoutChatBox( "YOUR MESSAGE", plr ); end end end 2. https://wiki.multitheftauto.com/wiki/SetMinuteDuration https://wiki.multitheftauto.com/wiki/SetTime
  21. 50p

    private message

    If msg is always string then it will never be nil. You can check if string is empty by checking its length (with #) or "". if msg == "" then -- message is empty... end -- OR if #msg == 0 then -- message is empty... end
×
×
  • Create New...