-
Posts
265 -
Joined
-
Last visited
Everything posted by Fury
-
thank you dude. problem fixed: <?$xml = simplexml_load_file ( 'http://apps.mta-tr.com/ASE/176.9.40.71:22078.xml' );$name = $xml->name;$mode = $xml->mode;$map = $xml->map;$num = $xml->num;$max = $xml->max;$players = "";echo "Server Name: " . $name . " Mode: " . $mode . " Map: " . $map . " Players: " . $num . "/" . $max . " Online Players: ";foreach($xml->players->node as $players) { echo $players." ";}?>
-
thanks for help. but i have a little problem. <? $xml = simplexml_load_file ( 'http://apps.mta-tr.com/ASE/176.9.40.71:22078.xml' ); $name = $xml->name; $mode = $xml->mode; $map = $xml->map; $num = $xml->num; $max = $xml->max; $player = $xml->players->node; echo "Server Name: $name<br />Mode: $mode<br />Map: $map<br />Players: $num/$max<br />Online Players:<br />$player" ?> i did this but it takes only first online player. how can i take all nodes at players node?
-
can you give me a example. i really dont understand this.
-
<XML ID="partsList" SRC="http://apps.mta-tr.com/ASE/176.9.40.71:22078.xml"></XML> <table DATASRC="#partsList"> <thead> <th>Name</th><th>Mode</th><th>Map</th><th>Number</th> <thead> <tr> <td><SPAN DATAFLD="name"></SPAN></td> <td><SPAN DATAFLD="mode"></SPAN></td> <td><SPAN DATAFLD="mode"></SPAN></td> <td><SPAN DATAFLD="num"></SPAN></td> </tr> </table> i did this but its not working
-
hey i have a xml like this; http://apps.mta-tr.com/ASE/176.9.40.71:22078.xml <MTA> <msgID>1</msgID> <ip>176.9.40.71</ip> <port>22078</port> <name> FuckN| :: Destruction Derby :: %100 DD :: The Fucking Noobs :: @FuckN.org </name> <mode>Race</mode> <map>Miracle Worker</map> <version>1.3</version> <num>3</num> <max>36</max> <players> <node>B.B|D0os</node> <node>[NCS]RICKARDO[24]</node> <node>B.B|Mad?</node> </players> </MTA> i want to take data's with html and show. how can i do it?
-
function clanTeamListFunc(source) local rowdata = {} local inumber = 0 for i, v in pairs(getAccounts()) do inumber = inumber + 1 local tName = getAccountData(v,'team') if tName then rowdata[inumber] = { team = tName } end end if (inumber ~= 0) then table.sort ( rowdata, function ( a, b ) return ( a.team or 0 ) < ( b.team or 0 ) end ) return rowdata end end karthik_184 solve the problem. thank you dude
-
function clanTeamListFunc(source) local rowdata = {} local inumber = 0 for i, v in pairs(getAccounts()) do inumber = inumber + 1 rowdata[inumber] = { team = getAccountData(v, "team") or "Empty" } end if (inumber ~= 0) then table.sort ( rowdata, function ( a, b ) return ( a.team or 0 ) < ( b.team or 0 ) end ) return rowdata end end hey guys i have this code. but i have a problem. it gets every "team" data on every player. i wanna get just only not empty data's. can you help me please?
-
function playerLogin (source) if isGuestAccount(getPlayerAccount(source)) then -- do nothing else local Staminastat = getAccountData (getPlayerAccount(source), "stat0") local Musculestat = getAccountData (getPlayerAccount(source), "stat1") local Healthstat = getAccountData (getPlayerAccount(source), "stat2") local Pistolskill = getAccountData (getPlayerAccount(source), "stat22") local SilencedPistolskill = getAccountData (getPlayerAccount(source), "stat23") local DesertEagleskill = getAccountData (getPlayerAccount(source), "stat24") local Shotgunskill = getAccountData (getPlayerAccount(source), "stat25") local SawnOffskill = getAccountData (getPlayerAccount(source), "stat26") local Spaz12skill = getAccountData (getPlayerAccount(source), "stat27") local Uziskill = getAccountData (getPlayerAccount(source), "stat28") local MP5skill = getAccountData (getPlayerAccount(source), "stat29") local AK47skill = getAccountData (getPlayerAccount(source), "stat30") local M4skill = getAccountData (getPlayerAccount(source), "stat31") local Sniperskill = getAccountData (getPlayerAccount(source), "stat32") setPedStat(source, 22, Staminastat) setPedStat(source, 23, Musculestat) setPedStat(source, 24, Healthstat) setPedStat(source, 69, Pistolskill) setPedStat(source, 70, SilencedPistolskill) setPedStat(source, 71, DesertEagleskill) setPedStat(source, 72, Shotgunskill) setPedStat(source, 73, SawnOffskill) setPedStat(source, 74, Spaz12skill) setPedStat(source, 75, Uziskill) setPedStat(source, 76, MP5skill) setPedStat(source, 77, AK47skill) setPedStat(source, 78, M4skill) setPedStat(source, 79, Sniperskill) end end end addEventHandler ("onPlayerLogin", getRootElement(), playerLogin) function onQuit (quitType, reason, responsibleElement) if (isGuestAccount (getPlayerAccount (source))) then -- do nothing else local account = getPlayerAccount (source) if (account) then setAccountData(account, "stat22", tostring(getPedStat(source, 69))) setAccountData(account, "stat23", tostring(getPedStat(source, 70))) setAccountData(account, "stat24", tostring(getPedStat(source, 71))) setAccountData(account, "stat25", tostring(getPedStat(source, 72))) setAccountData(account, "stat26", tostring(getPedStat(source, 73))) setAccountData(account, "stat27", tostring(getPedStat(source, 74))) setAccountData(account, "stat28", tostring(getPedStat(source, 75))) setAccountData(account, "stat29", tostring(getPedStat(source, 76))) setAccountData(account, "stat30", tostring(getPedStat(source, 77))) setAccountData(account, "stat31", tostring(getPedStat(source, 78))) setAccountData(account, "stat32", tostring(getPedStat(source, 79))) setAccountData(account, "stat0", tostring(getPedStat(source, 22))) setAccountData(account, "stat1", tostring(getPedStat(source, 23))) setAccountData(account, "stat2", tostring(getPedStat(source, 24))) end end end addEventHandler ("onPlayerQuit", getRootElement(), onQuit)
-
armySkins = { 287, 217 } armycars = { 432, 520, 425, 548 } function enterVehicle ( theVehicle, seat, jacked ) if ( armycars[getElementModel ( theVehicle )] ) and ( not armySkins[getElementModel ( source )] ) and (seat == 0) then cancelEvent() outputChatBox ( "Only army members can drive this car!", source ) end end addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) -- this is the event.
-
server: addEvent("clanMembers",true) function clanMembers() triggerClientEvent(source,"clanMembers",source,clanMembersFunc()) end addEventHandler("clanMembers",getRootElement(),clanMembers) function clanMembersFunc() local rowdata = {} local acc = getPlayerAccount(source) for index, account in pairs(getAccounts()) do rowdata[index] = { account = getAccountData(account,"nick") or getAccountName ( account ), status = getAccountData(account,"teamstatus"), team = getAccountData(account,"team"), } end local index = findAccByName ( getAccountData (acc, "team") ) if index then return rowdata end end function findAccByName ( teamname ) for rowdata, team in ipairs ( getAccounts() ) do local team = getAccountData(team,"team") if ( team == teamname ) then return rowdata -1 end end end i wanna make a list from team members. team name is stored at "team" data. so how can i take players who have same value in "team" data? i try something but it isnt working.
-
Wrong. Some scripts are published under certain licensing system and if you break it, you're in trouble. thats internet bro. there is a lot thing to protect people. cc thing protect nothing. and please dont reply if you arent interested with the offer..
-
Hi, guys. i am owner of F*ckN Destruction Derby Server. I want to make a Destruction Derby training server like TG's Death Match Training Server. So i need a script like this one; http://www.upload.ee/image/2771371/Untitled-2.jpg So anyone can do that for me, im ready to pay 50$ for it. have a nice day. ps: and please do not reply if you not interested with the offer.
-
this is destructionderby.lua. function DestructionDerby:handleFinishActivePlayer(player) -- Update ranking board for player being removed --if not self.rankingBoard then -- self.rankingBoard = RankingBoard:create() -- self.rankingBoard:setDirection( 'up', getActivePlayerCount() ) -- end --local timePassed = self:getTimePassed() --self.rankingBoard:add(player, timePassed) -- Do remove finishActivePlayer(player) -- Update ranking board if one player left setTimer(exports.FckNs:addToDeathlist,100,1,player, #getActivePlayers()) local activePlayers = getActivePlayers() if #activePlayers == 1 then --self.rankingBoard:add(activePlayers[1], timePassed) triggerEvent("onPlayerDestructionDerbyWin", getRootElement(), activePlayers[1]) setTimer(exports.FckNs:addToDeathlist,100,1,activePlayers[1], 1) --showMessage(getPlayerName(activePlayers[1]) .. ' is the final survivor!', 169, 214, end end i have problem on line 12 and 17. thanks.
-
Fake Server Name: F*ckN| :: Destruction 100% DD|DM|Hunter|Top :: The Fucking Noobs::@Serv4game.pl Fake Server IP: 178.33.196.51:22057 My team made F*ckN server for a long time ago(9 month ago) and someone fakes our server. I wish you can help us. Our website: www.fuckn.org
-
what the fuck are you talking about? i dont even know what "wtf" server uses. are you fucking idiot? how can you judge me when you dont know the codes are? omg....
-
thanks for helping guys.. problem solved..
-
what ? i dont stole anything? what the fuck are you talking about? im just new at lua thats it..
-
function hasar(damage) local player = getVehicleOccupant(source) if player then if (isGuestAccount(getPlayerAccount(source)) == false) then local account = getPlayerAccount( source ) local map = getResourceName ( exports['mapmanager']:getRunningGamemodeMap ( ) ) local ilkhasar = getAccountData( account, ""..map.."-damage" ) or 0 local hasar = math.floor(damage/1000) setAccountData( account,""..map.."-damage",ilkhasar+hasar) end end end addEventHandler("onVehicleDamage", getRootElement(), hasar) error in line 5, 7 and 9. can you please tell me what i am doing wrong?
-
rankingboard_client.lua: local sx,sy = guiGetScreenSize() RankingBoard = {} RankingBoard.__index = RankingBoard RankingBoard.instances = {} local screenWidth, screenHeight = guiGetScreenSize() local topDistance = 250 local bottomDistance = 0.3*screenHeight local posLeftDistance = 30 local nameLeftDistance = 60 local labelHeight = 16 local maxPositions = math.floor((screenHeight - topDistance - bottomDistance)/labelHeight) posLabel = {} playerLabel = {} alphaElem = {} colorElem = {} biggestLabelWidth = 0 function resetRankingboard () for id, elem in pairs(playerLabel) do setElementData(elem,"spectated",false) end for i, val in ipairs(Spectators) do table.remove(Spectators, i) end posLabel = {} playerLabel = {} Spectators = {} alphaElem = {} colorElem = {} biggestLabelWidth = 0 end addEvent("onClientMapStopping",true) addEventHandler ( "onClientMapStopping", getRootElement(), resetRankingboard ) function resetSpectators () for i, val in ipairs(Spectators) do table.remove(Spectators, i) end for id, elem in pairs(playerLabel) do setElementData(elem,"spectated",false) end Spectators = {} end addEvent("onClientPlayerWasted",true) addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), resetSpectators ) function RankingBoard.create(id) RankingBoard.instances[id] = setmetatable({ id = id, direction = 'down', labels = {}, position = 0 }, RankingBoard) posLabel = {} playerLabel = {} end function RankingBoard.call(id, fn, ...) RankingBoard[fn](RankingBoard.instances[id], ...) end function RankingBoard:setDirection(direction, plrs) self.direction = direction if direction == 'up' then self.highestPos = plrs--#g_Players self.position = self.highestPos + 1 end end function RankingBoard:add(name, time) local position local y local doBoardScroll = false if self.direction == 'down' then self.position = self.position + 1 if self.position > maxPositions then return end y = topDistance + (self.position-1)*labelHeight elseif self.direction == 'up' then self.position = self.position - 1 local labelPosition = self.position if self.highestPos > maxPositions then labelPosition = labelPosition - (self.highestPos - maxPositions) if labelPosition < 1 then labelPosition = 0 doBoardScroll = true end elseif labelPosition < 1 then return end y = topDistance + (labelPosition-1)*labelHeight end posLabel[name], posLabelShadow = createShadowedLabelFromSpare(posLeftDistance, y, 20, labelHeight, tostring(self.position) .. ')', 'right') if time then if not self.firsttime then self.firsttime = time time = '' .. msToTimeStr(time) else time = '#ffffff+' .. msToTimeStr(time - self.firsttime) end else time = '' end --time = " " playerLabel[name], playerLabelShadow = createShadowedLabelFromSpare(nameLeftDistance, y, 250, labelHeight, name ..' #abcdef:: #ffffff'..time..'') local team = getPlayerTeam( getPlayerFromName( name ) ) if team then Cr,Cg,Cb = getTeamColor(team) else Cr,Cg,Cb = 255,255,255 end table.insert(self.labels, posLabel[name]) table.insert(self.labels, posLabelShadow) table.insert(self.labels, playerLabel[name]) table.insert(self.labels, playerLabelShadow) alphaElem[playerLabel[name]] = 0 alphaElem[posLabel[name]] = 0 colorElem[playerLabel[name]] = {30,30,30} playSoundFrontEnd(7) guiSetAlpha(posLabel[name], 0) guiSetAlpha(posLabelShadow, 0) guiSetAlpha(playerLabel[name], 0) guiSetAlpha(playerLabelShadow, 0) if doBoardScroll then local anim = Animation.createNamed('race.boardscroll', self) anim:addPhase({ from = 0, to = 1, time = 1250, fn = RankingBoard.scroll, firstLabel = posLabel[name] }) anim:addPhase({ fn = RankingBoard.destroyLastLabel, firstLabel = posLabel[name] }) anim:play() end for id, elem in pairs(playerLabel) do local widthRezise1 = dxGetTextWidth(string.gsub( guiGetText(elem), '#%x%x%x%x%x%x', '' ),1,"default-bold") if widthRezise1 > biggestLabelWidth then biggestLabelWidth = widthRezise1 end end end function RankingBoard:scroll(param, phase) local firstLabelIndex = table.find(self.labels, phase.firstLabel) for i=firstLabelIndex,firstLabelIndex+3 do guiSetAlpha(self.labels[i], param) end local x, y for i=0,#self.labels/4-1 do for j=1,4 do x = (j <= 2 and posLeftDistance or nameLeftDistance) y = topDistance + ((maxPositions - i - 1) + param)*labelHeight if j % 2 == 0 then x = x + 1 y = y + 1 end guiSetPosition(self.labels[i*4+j], sx + x, y, false) end end for i=1,4 do guiSetAlpha(self.labels[i], 1 - param) end end function RankingBoard:destroyLastLabel(phase) for i=1,4 do destroyElementToSpare(self.labels[1]) guiSetVisible(self.labels[1],false) table.remove(self.labels, 1) end local firstLabelIndex = table.find(self.labels, phase.firstLabel) for i=firstLabelIndex,firstLabelIndex+3 do guiSetAlpha(self.labels[i], 1) end end function RankingBoard:addMultiple(items) for i,item in ipairs(items) do self:add(item.name, item.time) end end function testing (c,name) RankingBoard:add(name) end addCommandHandler("addt",testing) function RankingBoard:clear() table.each(self.labels, destroyElementToSpare) self.labels = {} end function RankingBoard:destroy() self:clear() RankingBoard.instances[self.id] = nil end Spectators = {} addEvent('addSpectator', true) addEvent('removeSpectator', true) addEventHandler('addSpectator', getRootElement(), function(Spectator) table.insert(Spectators, Spectator) for idS, spectatorer in pairs(Spectators) do for id, elem in pairs(playerLabel) do if id == getPlayerNametagText(spectatorer) then setElementData(elem,"spectated",true) end end end end ) addEventHandler('removeSpectator', getRootElement(), function(spectator) for i, val in ipairs(Spectators) do if (val == spectator) then table.remove(Spectators, i) for id, elem in pairs(playerLabel) do if id == getPlayerNametagText(val) then setElementData(elem,"spectated",false) end end end end end ) -- -- Label cache -- local spareElems = {} local donePrecreate = false function RankingBoard.precreateLabels(count) donePrecreate = false while #spareElems/4 < count do local label, shadow = createShadowedLabel(10, 1, 20, 10, 'a' ) --guiSetAlpha(label,0) guiSetAlpha(shadow,0) guiSetVisible(label, false) guiSetVisible(shadow, false) destroyElementToSpare(label) destroyElementToSpare(shadow) end donePrecreate = true end function destroyElementToSpare(elem)
-
why did you do it with this way? you can save the wheel while you choose the wheel. it will be much more easy.
-
you can edit the position by yourself. it will be same position on every resolution. It won't be centered above the radar. That's the problem ! show us your code so we can help you!..