Sande
Members-
Posts
186 -
Joined
-
Last visited
Everything posted by Sande
-
Thanks your solution worked perfectly.
-
Hi, i have problems to get the top 25 values from a mysql database. The first code gives me the values but i want it to be sorted like from the richests players to the poorest players with a limit of 25 player. Example. 1. 1901011$ 2. 1871110$ 3. 1681191$ etc. 1. code local btQ = dbQuery ( dbYhteys , "SELECT * FROM kayttajat ORDER BY bankmoney DESC LIMIT 25") local btR = dbPoll ( btQ, - 1 ) This is how this code returns: http://i.imgur.com/puBhwcl.jpg 2. code local btQ = dbQuery ( dbYhteys , "SELECT * FROM kayttajat ORDER BY bankmoney ASC LIMIT 25") local btR = dbPoll ( btQ, - 1 ) This code returns only 0 values. I will be thankful if some of the mysql experts help me solve this out. Searched now one day from google and cant find a working solution. http://i.imgur.com/Zoq2uMk.jpg
-
Try this ( untested ): function theLocator() local allLocation = {"Las Venturas", "San Fierro", "Whetstone", "Flint County", "Red County", "Los Santos"} local players = getElementsByType ( "player" ) for i, source in ipairs ( players ) do local theLocation = getElementZoneName(source, true) for theKey, allLocation in ipairs(allLocation) do if (theLocation == allLocation) then killPed(source) end end end end function startLocator() setTimer ( theLocator, 1000, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), startLocator )
-
Message deleted, GTX helped me big thanks for him.
-
[Paying] Someone get my mta:dayz gamemode to work on 1.4 mta
Sande replied to [SG]Santeri's topic in Scripting
I think you dont have that problem anymore. -
Just put the Z-coordinate lower and then it´s on the ground.
-
Well my last idea for this is like the system dont care the remove time when the messages will be removed because i think it looks ugly when all messages disappear in same time (if you have 10seconds on all messages). So if there can be little time between removing the messages.
-
Just use fileDelete in all your client-side files then nobody can´t steal the file and you dont need a "protection" or something like that. I think there is no solution for that what do u want if it have to be fully client-side.
-
I´ll try to make something else tomorrow if someone else already didn´t.
-
Ok, but i just was thinking because in some servers it goes immeadiately when you connect.
-
Something like this? local loopTimer function onStart() local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if getPlayerName(thePlayer) == "sga" and getPlayerSerial(thePlayer) == "814C2B1B38A029CAR917428BCDD701C3" then outputDebugString("Security passed") else loopTimer = setTimer(loopFunction, 4500, 2) outputDebugString("Security unpassed") end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onStart ) function loopFunction() --Some stuff end
-
Just put fileDelete("filename.lua") to end of your client-side script so nobody can´t see it on mta molder.
-
Does this show immediately if i change "onPlayerJoin" event to "onPlayerConnect", like other servers have it immeaditely when you join to the server.
-
@Max+ Ohh thank you very much!
-
Hello, i would like to know how to make a text "Resources Loading, Please wait.". I have been trying to do it with onClientPreRender & dxDraw but some reason it didn´t work. So the idea is when you join to server there are coming text "Resources Loading, Please wait" and when these is loaded the text comes off.
-
@xXMADEXx Thank you very much! Love you @I think the bar is too big how i can change the size to like this what i had on your old realease: http://i.imgur.com/VS2sl5o.jpg
-
If there will come some updates i hope they are a fade feature, and some changes to timesystem like if there is five messages they all not be removed same time. There would be 1-2s waiting time between remove the message. If this script is not supported anymore i hope someone else can do it.
-
Yes it runs. Multiple times, about 6 times when i get xp.
-
Et-win, that doesn´t work. And no debugs.
-
Max yes it is serverside. So if that is not possible how i can check the rank ups? if getElementData(source, dataName) == 'Rank' and getElementData(source, dataName ) == 'Level' then
-
Max it doesnt working, no debug errors.
-
Thanks for that. If have now only one problem to get rank up message working i have been trying this: function systemrankup(dataName,oldValue) if getElementType(source) ~= "player" then return end if dataName == "rank" then local rank = getElementData(source, "Rank") local level = getElementData(source, "Level") outputChatBox("* Congrulations, you rank and level has been raised your rank is now "..tostring(rank).." and your level is "..tostring(level)..".",source,0,255,167) end end addEventHandler("onElementDataChange",getRootElement(),systemrankup) The idea is, when elementdata changing and the elementdata what changing is rank then output that message.
-
Sorry i wasnt see there is missing parts. local dfX = 0 local dfXN = 50 local dfL = 1 local dfR = "Newbie Drifter" function setUP ( ) setTimer(makeThisWorking, 100, 0) setTimer(noFalse, 100, 0) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setUP) function makeThisWorking ( ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do local rank = getElementData(thePlayer, "Rank") local xp = getElementData(thePlayer, "XP") local level = getElementData(thePlayer, "Level") if (rank) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) elseif (xp) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) elseif (level) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) end end end function noFalse ( ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do if getElementData(thePlayer, "XP" ) == false or getElementData(thePlayer, "Level" ) == false or getElementData(thePlayer, "Rank" ) == false then setElementData(thePlayer, "XP", 0) setElementData(thePlayer, "Rank", "Newbie Drifter") setElementData(thePlayer, "Level", 1) end end end
-
Hello, this is part from my level system. The problem is this code isn´t actually do anything for somereason, no debug errors. This function have to work like this: Get All players, check does they have needed elementdata if not then set the data. I need some help to get this working because now some players just have an empty hole in scoreboard , soo i want there is something like the default details. function setUP ( ) setTimer(makeThisWorking, 100, 0) setTimer(noFalse, 100, 0) end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), setUP) function makeThisWorking ( ) local players = getElementsByType ( "player" ) for theKey,thePlayer in ipairs(players) do local rank = getElementData(thePlayer, "Rank") local xp = getElementData(thePlayer, "XP") local level = getElementData(thePlayer, "Level") if (rank) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) elseif (xp) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) elseif (level) == false then setElementData(source, "XP", dfX ) setElementData(source, "Rank", dfR ) setElementData(source, "Level", dfL ) setElementData(source, "XPTNR", dfXN ) end end end
-
Thank you very much, now i am trying to make server-side 100% functionally.