
BieHDC
Members-
Posts
296 -
Joined
-
Last visited
BieHDC's Achievements

Pee-Wee (21/54)
0
Reputation
-
btw: use root instead of getRootElement() which is much less to write and faster
-
this means the "Playtime" isnt given you need a script which count players play time edit it like you need --serverside exports.scoreboard:addScoreboardColumn('PlayTime') local t = { } function checkValues( source,arg1,arg2) if (arg2 >= 60) then t[ source ][ 'min' ] = tonumber( t[ source ][ 'min' ] or 0 ) + 1 t[ source ][ 'sec' ] = 0 end if (arg1 >= 60) then t[ source ][ 'min' ] = 0 t[ source ][ 'hour' ] = tonumber( t[ source ][ 'hour' ] or 0 ) + 1 end return arg1, arg2 end setTimer( function( ) for _, v in pairs( getElementsByType( "player" ) ) do if (not t[ v ]) then t[ v ] = { ["hour"] = 0, ["min"] = 0, ["sec"] = 0 } end t[ v ][ 'sec' ] = tonumber( t[ v ][ 'sec' ] or 0 ) + 1 local min,sec = checkValues ( v, t[ v ][ 'min' ] or 0, t[ v ][ 'sec' ] or 0 ) local hour = tonumber( t[ v ][ 'hour' ] or 0 ) setElementData( v, "PlayTime", tostring( hour )..':'..tostring( min )..':'..tostring( sec ) ) end end, 1000, 0 ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local sValue = getElementData( source,'PlayTime' ) local hour = tonumber( t[ source ][ 'hour' ] or 0 ) local min = tonumber( t[ source ][ 'min' ] or 0 ) local sec = tonumber( t[ source ][ 'sec' ] or 0 ) setAccountData ( playeraccount, "PlayTime-hour", tostring(hour) ) setAccountData ( playeraccount, "PlayTime-min", tostring(min) ) setAccountData ( playeraccount, "PlayTime-sec", tostring(sec) ) setAccountData ( playeraccount, "PlayTime", tostring(sValue) ) end t[ source ] = nil end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local time = getAccountData ( playeraccount, "PlayTime" ) local hou = getAccountData ( playeraccount, "PlayTime-hour") local min = getAccountData ( playeraccount, "PlayTime-min") local sec = getAccountData ( playeraccount, "PlayTime-sec") if ( time ) then setElementData ( source, "PlayTime", time ) t[ source ]["hour"] = tonumber(hou) t[ source ]["min"] = tonumber(min) t[ source ]["sec"] = tonumber(sec) else setElementData ( source, "PlayTime",0 ) setAccountData ( playeraccount, "PlayTime",0 ) end end end addEventHandler ( "onPlayerQuit", root, onPlayerQuit ) addEventHandler ( "onPlayerLogin", root, onPlayerLogin )
-
https://wiki.multitheftauto.com/wiki/Resource:Race scroll down to "onRaceStateChanging" "Running" is setted after Countdown
-
have a look on this: https://community.multitheftauto.com/in ... ls&id=8019 simple, uncomplimed and basic you can have a look on it and see how it works
-
tonumber wasnt needed this care because its done automatic (i think ;D ) can i pm you on xml based questions? because lua i can do most things and currently i wanna learn xml for a clan panel
-
hell yea thanks dude btw. are you xml pro?
-
ok readout is done, but i have a problem with a thing: Velocity="0,0,1" > returns as string but i need it in 3 values like vx,vy,vz = 0,0,1 what function i have to use for this?
-
Thank you Tete, this is the first helpful post. (this is not sarcasm)
-
ok 1st thing BUT how to find TeleportIN and then how to read out the argumeants (posX...)
-
Can somebody explain me how to read this in a script? Because on some servers Action Script buggs around so i recreate the script, but i dont have the experience in xml If somebody can make a an example, this would be great > Visiblemarker="false" TeleportID="10" trigger="marker" AS-ID="1" ConditionalNOTHIT="" ConditionalHIT="" Markersize="5" Removeafteruse="false" posX="3584.3999023438" Markercolor="255,255,255,255" posZ="7.6999998092651" Delay="0" posY="-2349.6999511719">> Visiblemarker="false" TeleportID="10" trigger="marker" AS-ID="1" ConditionalNOTHIT="" ConditionalHIT="" Markersize="5" Removeafteruse="false" posX="3454.8999023438" Markercolor="255,255,255,255" posZ="22.10000038147" Delay="0" posY="-2225.3000488281">> Visiblemarker="false" trigger="marker" AS-ID="1" Velocity="0,0,1" ConditionalNOTHIT="" ConditionalHIT="" Markersize="2" Removeafteruse="false" posX="1098" Markercolor="255,255,255,255" posZ="12.5" Delay="0" posY="1447.8000488281">> Visiblemarker="false" trigger="world" AS-ID="1" Message="Text" ConditionalNOTHIT="" ConditionalHIT="" Markersize="5" Removeafteruse="false" posX="0" Markercolor="8,0,183,255" posZ="0" Delay="0" posY="0">>>
-
I have had the same problem But i can say you that you trigger a Server event when the client joins and the server sends a table back to client and save it. and you have to recreate the table serverside or the client cant read
-
btw: if you dont use the web interface then turn it off
-
runcode is scripting ingame as i would say if your admin have accsess, they can start it and start scripting like give all players money or set for all vehicles velocity or whatever But your server should be secure now(hopefully) if not then write again in this theard Why i know so much about server security? Because i completed some security courses and thats why i know how to handle this
-
Is the resource "runcode" running? and i still think he owned any admin account and then created his "Console" account and i hope you choosen a very long password (min 32 chars i would say) but the best would be cleaning user db and resetup the acl If you have saved everything in the db then you cant so this, but would be most secure
-
I was looking through your log and this Guy logged in as "Console." and not "Console" look in your acl if there is such an 2nd account and maybe could be this guy be an ex admin or hacked another admin? OR a stupid guy has given the Console a password with setAccountPassword ?