Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. ya, using this function: FireWeapon
  2. thanks, I'm currently working on a generator for you guys
  3. Jaysds1

    html and xlm

    here: <html> <body> <script> if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET","cd_catalog.xml",false); xmlhttp.send(); xmlDoc=xmlhttp.responseXML; document.write("<table border='1'>"); var x=xmlDoc.getElementsByTagName("CD"); for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue); document.write("</td></tr>"); } document.write("</table>"); </script> </body> </html> if you don't know what JavaScript is, I suggest you read more about it on the same site I posted above.
  4. Jaysds1

    Stopping Voice

    All you have to do is type in '/stop voice' or in the console 'stop voice'.
  5. Jaysds1

    html and xlm

    Actually, you would need to use JavaScript and get it, try this: http://www.w3schools.com/xml/xml_http.asp
  6. Jaysds1

    MTA problem

    Sorry, Can you post a screenshot please?
  7. Same, My internet was down for a week, so since I have it now then I want to say Happy birthday.
  8. try this: local newTeam = nil --make this variable global in this script only addEventHandler("onResourceStart",resourceRoot,function () newTeam = createTeam ( "MP" , 255, 0 , 0 ) --creates team end) addCommandHandler("joinMP", function(source) if not newTeam then outputChatBox("Team couldn't be created!") return end --if the team wasn't created, then tell them and stop the script if getPlayerTeam(source) == newTeam then --if the player is on the team outputChatBox("You are already on the team!") --tell them that they are on the team else setPlayerTeam(source,newTeam) --put them on the team setElementModel(source,164) --change their skin outputChatBox("You are now on the Military team!") --then tell them they're on the team end end)
  9. YES!!!! I love everything you listed, THANKS
  10. Jaysds1

    playsound

    try this: local sound = nil --define the var global function playTheSound ( ) local music = guiGridListGetItemText ( gridlist1, guiGridListGetSelectedItem ( gridlist1 ), column1 ) --column1 isn't defined sound = playSound (music) setSoundVolume (sound, 1.0) outputChatBox ( " Started Playing " ..music ) end addEventHandler ( "onClientGUIClick", button2, playTheSound, false ) function stopTheSound ( ) stopSound(sound) outputChatBox ( music.. "Stopped" ) end addEventHandler ( "onClientGUIClick", button3, stopTheSound, false ) and if this doesn't work, then I would need to see the full script
  11. Jaysds1

    Top ten

    try this, Server: function sortAccounts( ) local rowdata = { } for _, account in pairs( getAccounts( ) ) do rowdata[ #rowdata + 1 ] = { account = getAccountName( account ), points = getAccountData( account,"Points" ) } end table.sort( rowdata, function ( a, b ) return ( tonumber( a.points ) or 0 ) > ( tonumber( b.points ) or 0 ) end ) return rowdata end function tables( ) outputChatBox( "Top 10 points:", root, 255,255,255 ) local topPoints = sortAccounts() for index, data in ipairs(topPoints)do outputChatBox(tostring( index )..": ".. tostring( data.account ) .." - ".. tostring( data.points ), root, 255, 255, 255 ) triggerClientEvent( 'onAccountsSend',root,index,data.account,data.points) if index == 10 then break end end end addEvent("onSortTopTen", true) addEventHandler("onSortTopTen", root, tables) addCommandHandler( "top", tables ) Client: addEventHandler ( "onClientResourceStart",resourceRoot,function() local playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) guiGridListAddColumn( playerList, "Player", 0.6 ) guiGridListAddColumn( playerList, "Points", 0.3 ) triggerServerEvent("onSortTopTen",localPlayer) end) addEvent("onAccountsSend",true) addEventHandler("onAccountsSend",root,function(topNum,name,points) local row = guiGridListAddRow(playerList) guiGridListSetItemText(playerList, row, 1, data.account, false, false ) guiGridListSetItemText(playerList, row, 2, data.points, false, true ) end)
  12. Jaysds1

    Top ten

    It seems like he wants a top ten playlist, which gets every account on his server and sort them out with the highest points. His problem is on line 22 in the server-side script
  13. Jaysds1

    Bigger Wheels

    It's probably the mod or the game it self. You could edit the wheel size using MTA's functions, but you would need to know about LUA.
  14. Jaysds1

    Java SDK 0.2

    here: http://www.solidfiles.com/d/7713c8510b/
  15. Jaysds1

    Bigger Wheels

    before you install the mods on the hotring racers, are they big?
  16. ok, now try this: addEventHandler("onPlayerLogin",root,function(_,acc) if not getPlayerGangName(source)then return end local permission=getAccountData(acc,"permission") if not permissions[permission] then return end triggerClientEvent(source,"ganging",source,permission) outputChatBox("You've joined group ("..getPlayerGangName(source)..") as a ("..permission ..")",source,255,255,0) for _,v in ipairs(getAccounts()) do local player = getAccountPlayer(v) if not getPlayerGangName(player) then return end if isElement(player)then triggerClientEvent(source,"recieveingPlayers",source,"online",getAccountName(v),getPlayerName(player)) else triggerClientEvent(source,"recieveingPlayers",source,"offline",getAccountName(v)) end end for _,v in ipairs(getElementsByType("player")) do if getPlayerGangName(v) then return end outputChatBox("Memeber "..getPlayerName(source).." has joined the group as a " .. permission,v,0,255,0) triggerClientEvent(v,"memberLoggedIn",v,getAccountName(getPlayerAccount(source)),getPlayerName(source)) end end) local function getPlayerGangName(player) local acc=getPlayerAccount(player) if acc then return tostring(getAccountData(acc,"gangs")) end return false end
  17. oh, that's why, on line 8 you are sending an account not a player argument. try this: addEventHandler("onPlayerLogin",root,function(_,acc) if not getAccountData(acc,"gangs")then return end local permission=getAccountData(acc,"permission") if not permissions[permission] then return end triggerClientEvent(source,"ganging",source,permission) outputChatBox("You've joined group ("..getPlayerGangName(source)..") as a ("..permission ..")",source,255,255,0) for _,v in ipairs(getAccounts()) do local player=getAccountPlayer(v) if not getPlayerGangName(player)then return end local accName = getAccountName(v) if player and isElement(player)then triggerClientEvent(source,"recieveingPlayers",source,"online",accName,getPlayerName(player)) else triggerClientEvent(source,"recieveingPlayers",source,"offline",accName) end end for _,v in ipairs(getElementsByType("player")) do if not getPlayerGangName(v)then return end outputChatBox("Memeber "..getPlayerName(source).." has joined the group as a " .. permission,v,0,255,0) triggerClientEvent(v,"memberLoggedIn",v,getAccountName(getPlayerAccount(source)),getPlayerName(source)) end end)
×
×
  • Create New...