MRThinker
-
Posts
117 -
Joined
-
Last visited
Posts posted by MRThinker
-
-
Hello
I have a problem
How to make each player can create an account with just one serial? -
1 hour ago, N3xT said:
no!
im not work with Admin ACL
im working with ElementData
example :
setElementData(thePlayer,"staff,10)
10 is Server Owner
plz fix my code with ElementData
-
hi guys!
what is my problem ?
function getOnlineAdmins() local t = {} for k,v in ipairs ( getElementsByType("player") ) do while true do local acc = getElementData(v,"esmeAcc") if not acc then break end local isAdmin = getElementData(acc,"staff") if isAdmin == true then table.insert(t,v) end break end end return t end
-
1 hour ago, JeViCo said:
it's a shared function. The main difference between server and client: server contains player variable.
client-side example:
bindKey("g","down",function() -- your function here end) -- "g" - key to press -- "down" - key pressed ("up" if key released)
server-side example:
addEventHandler("onPlayerLogin",getRootElement(),function() bindKey(source,"g","down",function() -- your function here end) end) -- source - player variable in this event -- "g" - key to press -- "down" - key pressed ("up" if key released)
@MRThinker
oh thanks
now i know bindKey
- 1
-
what is BindKey ?
bindKey is client side or server side ?
how to use this function ?
plz help me!
-
2 minutes ago, Dimos7 said:
ID = {} exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 1) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
id now showing or id after Name
10 minutes ago, Dimos7 said:ID = {} exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 1) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
worked successfuly !
-
5 minutes ago, Dimos7 said:
ID = {} exports["scoreboard"]:addScoreboardColumn("ID", root, 20, "ID", 2) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
Save it restart the resource and after change it to
This code not only shows the id before the name, it does not even show an id
-
Just now, Dimos7 said:
You have orginal scoreboard or dx one?
i have original scoreboard
-
Just now, Dimos7 said:
That is impossible for me that code put the id before name
-
2 minutes ago, #STARK said:
replace this exports["scoreboard"]:addScoreboardColumn("ID", root, 20, "ID", 1)
with this
exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 1)
worked but ID showing after Name
how to show ID before Name ?
-
3 minutes ago, Dimos7 said:
ID = {} exports["scoreboard"]:addScoreboardColumn("ID", root, 20, "ID", 1) ------------------------ [ Events ] -------------------------- addEventHandler("onPlayerJoin", root, function() for i = 0 , getMaxPlayers() do if not ID[i] then ID[i] = source setElementData(source, "id", i) break end end end) -- addEventHandler("onPlayerQuit", root, function() ID[getPlayerID(source)] = nil end) -- addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do for i = 0, getMaxPlayers() do if not ID[i] then ID[i] = v setElementData(v, "id", i) break end end end end) ---------------------------------- [ Fnctions ] ------------------------------------ function getPlayerID(player) if player and isElement(player) and getElementType(player) == "player" and getElementData(player, "id") then return getElementData(player, "id") end return false end -- function getPlayerFromID(id) if id and tonumber(id) and ID[tonumber(id)] then return ID[tonumber(id)] end return false end
worked but id dont showing on scoreboard !
-
Just now, Dimos7 said:
how me your code
exports [ "scoreboard" ]:addScoreboardColumn ( "ID", getRootElement() ) function showID (player) for index, player in ipairs ( getElementsByType "player" ) do setElementData(player,"ID",getElementData(player,"id")) end end addEventHandler("onPlayerJoin",getRootElement(),showID)
-
1 minute ago, Dimos7 said:
hi @Dimos7
i have a id system
how to make a column on Scoreboard and show the ID's on that column ?
-
3 minutes ago, MIKI785 said:
This is not a place to request full code.. and there are far too many functions to list, it also depends on what exactly you want. Just check the GUI functions on the wiki and see what kind of elements you want to utilise. It's all documented there, the rest is straight forward.. player name? getPlayerName.. player money? getPlayerMoney... wanted level? getPlayerWantedLevel... you see the pattern yet?
i know this functions...
i dont know gui functions !
plz give me
-
Just now, MIKI785 said:
Do you see the word Client in onClientClick? It's a client event, so it has to be on the client side.
OK Bro
-
1 minute ago, MIKI785 said:
Use onClientClick and then getVehiclePlateText
thanks
1 minute ago, MIKI785 said:Use onClientClick and then getVehiclePlateText
make script with client side or server side ?
-
hi guys
i wank make a stats panel !
like : press F1 and show GUI and show player name, show player money, show player wanted level and more ...
plz give me code or functions
-
Hi Guys
I want to do that by clicking on cars to show the license plate in chat
plz give me the functions
-
Just now, AncienT said:
dxScoreboard is scoreboard
ok now give me a code for make ID Column before PlayerName
-
3 minutes ago, AncienT said:
Nececitas order the columns
exports.dxscoreboard:scoreboardAddColumn(ID)
exports.dxscoreboard:scoreboardAddColumn(playerName)
what is dxscoreboard ?
-
1 minute ago, AncienT said:
Nececitas order the columns
exports.dxscoreboard:scoreboardAddColumn(ID)
exports.dxscoreboard:scoreboardAddColumn(playerName)
how ?
1 minute ago, AncienT said:Nececitas order the columns
exports.dxscoreboard:scoreboardAddColumn(ID)
exports.dxscoreboard:scoreboardAddColumn(playerName)
plz give me this code
-
Hi Guys
im maked a id system and show id on score board !
but ID Column showing after Name
I want to make the ID before the name?
-
Hello
I have a database
To save players password
But my problem is that the passwords are hash!
What can I do to get into a hash? -
Hi guys
Plz give me a script for repair vehicle
Like : /fix <PartOfName>
OOutputChatBox for target : Admin MRThinker fixed your vehicle!
Thanks
[HELP] Serial Account
in Scripting
Posted
Ok, Thanks