-
Posts
627 -
Joined
-
Last visited
Everything posted by Phat Looser
-
It was fun to script it "the basic way", but thank you. Can you also make it that passworded pakets are ignored by the http antispam? I don't want to raise the http paket count, after all it helps against people spamming http pakets. And whats a bit annoying too is the fact that you have to add ALL resources with a remote-callable function in the ACL and forbit access for http guest. If you forget one its a security hole.
-
Provided by someone else, but still good: the derby (dd/dm) server. Stealth had another record player count: 13! Time for even more.
-
install gcc
-
Its the most basic function you can imagine. Even the callbacks have to be set "per call", otherwise you don't know which server gave his OK and which didn't, and which function was the one that gave back the OK.
-
Yes. Its using callRemote for that, but its a bit more complicated since I don't want servers I don't know to be able to join the chat relay. The "main resource", the one which gets triggered by server-internal events is based on the concept that there is one server somewhere invisible which does the chat and command relay, and the other servers have to ask that one server for permission to join. If that server shuts down they'll use a backup one which has the same abilities as the first one. But thats not really what I had in mind, I wanted it P2P style, but currently that would provide security holes.
-
Server switching has been activated - type /stealth to join the stealth server, /climbing to join climbmode and /zombie to join zombie mod.
-
I guess he can't understand them anyways.
-
Who wants sweets? Forget it, even if you slap people around they don't want servers to be hosted for free. Its much more fun if they have to pay for it. Same goes for me, I trust my own root server.
-
Hello guys. I know I already created two topics, and this one is to prevent creating two more. Instead of talking about each single one of my servers, I want to talk about all of them together. The chaos.de.to community is different to any other community. Not only because people all over the world are playing almost lag-free gamemodes. I decided to grow all servers together. Zombie mode, Climbing, Stealth, derby, and - if Jasper allowes it - RPG are all part of one big cloud system. The goal is that you can be playing together with all players on all servers, even though you like different gamemodes and prefer climbing to senseless slaughter. Also, you should be able to switch servers with the blink of your eye soon. Since the resource system they use has been grown-together for ages you can guess that the changes in HUD, anticheat or else in one server automatically are set up in all the other servers, too. That means creating four different topics about each of my servers makes no sense.
-
I connected the servers with each other. The first experiment is to have one chatbox for all servers, so you can see whats going on on all the other servers. I guess the next experiment is to enable players to switch servers per button press. Since the connection system is dynamic, i can add any servers any time.
-
Too many buttons to click I guess.
-
How bout a bit more clicking on that funny red text?
-
Because they don't know that there is a MTA:DM? Weirdos.
-
You can get them no where, and no one is going to make them for you.
-
Aand I added commands: /highping, /lowping and /forcelowping will help you to be as lag-free as possible, even though some of the functions won't work in the highping mode.
-
Can someone who doesn't even know the basic things be trusted? Its not only that you COULD be stealing the scripts, its also that you have to make sure no one else steals them. In fact, you can't open your own website and already try to host MTA servers. And hosting MTA servers can be troublesome, especially if someone tries to use MYSQL stuff and you are using Debian 64 bit. Nuff said, getting a website is the least issue. In fact, its not even an issue at all. Hosting the website is the playground, the tip of the iceberg, or nuff said: I guess its not even necessairy. Maybe thats just my opinion because I hate SQL and PHP due to the security holes it provides.
-
Do you want to advertise in the RPG server?
-
Its nice that I'm beginning to have fans
-
I sort of had to do it, due to my syncro. There is a new HUD System now.
-
Since I used the code for my own resource, I felt the need to give something back. -- Weapon tables for ammo. local resourceroot = getResourceRootElement(getThisResource()) local sWidth, sHeight = guiGetScreenSize() -- Getting the screen size local localPlayer = getLocalPlayer() local noreloadweapons = {} --Weapons that doesn't reload (including the flamethrower, minigun, which doesn't have reload anim). noreloadweapons[16] = true noreloadweapons[17] = true noreloadweapons[18] = true noreloadweapons[19] = true noreloadweapons[25] = true noreloadweapons[33] = true noreloadweapons[34] = true noreloadweapons[35] = true noreloadweapons[36] = true noreloadweapons[37] = true noreloadweapons[38] = true noreloadweapons[39] = true noreloadweapons[41] = true noreloadweapons[42] = true noreloadweapons[43] = true local meleespecialweapons = {} --Weapons that don't shoot, and special weapons. meleespecialweapons[0] = true meleespecialweapons[1] = true meleespecialweapons[2] = true meleespecialweapons[3] = true meleespecialweapons[4] = true meleespecialweapons[5] = true meleespecialweapons[6] = true meleespecialweapons[7] = true meleespecialweapons[8] = true meleespecialweapons[9] = true meleespecialweapons[10] = true meleespecialweapons[11] = true meleespecialweapons[12] = true meleespecialweapons[13] = true meleespecialweapons[14] = true meleespecialweapons[15] = true meleespecialweapons[40] = true meleespecialweapons[44] = true meleespecialweapons[45] = true meleespecialweapons[46] = true aClassList = {}; aObjectList = {}; iObjectCount = 0; function createClass(sName,aFunctionList) if aClassList[sName] then return; end aClassList[sName] = {}; local class = aClassList[sName]; for sFunctionName,fFunction in pairs(aFunctionList) do if type(sFunctionName) == "string" and type(fFunction) == "function" then class["f"..sFunctionName] = fFunction; end end if not class.fDestruct then class.fDestruct = fGeneralDestructor; end class.getVar = function(elm,sName) return elm["v"..tostring(sName)]; end class.setVar = function(elm,sName,value) elm["v"..tostring(sName)] = value; end end function createObject(sClass,aVariableList) if not aClassList[sClass] then return; end iObjectCount = iObjectCount + 1; aObjectList[iObjectCount] = {}; local object = aObjectList[iObjectCount]; for sString,fFunction in pairs(aClassList[sClass]) do object[sString] = fFunction; end for sVarName,vVariable in pairs(aVariableList) do if type(sVarName) == "string" and type(vVariable) ~= "function" then object["v"..sVarName] = vVariable; end end object.identifier = iObjectCount; end --------------------------------------- function getHealthColorActive(health) local maxHealth = 100; -- get max health stat local colourPercent = ( health / maxHealth ) * 200; local red, green; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red = 200; green = ( health / 50 ) * ( colourPercent * 2 ); else green = 200; red = 200 - ( ( health - 50 ) / 50 ) * 200; end return tocolor(red,green,0,200); end function getHealthColorInactive(health) local maxHealth = 100; -- get max health stat local colourPercent = ( health / maxHealth ) * 75; local red, green; -- we don't need blue because we don't use it, it'll be 0 if health < ( maxHealth / 2 ) then red = 75; green = ( health / 50 ) * ( colourPercent * 2 ); else green = 75; red = 75 - ( ( health - 50 ) / 50 ) * 75; end return tocolor(red,green,0,150) end function drawHealthBar(elm) if getElementData(localPlayer,"HUD_NOHEALTH") then return; end local health = getElementHealth( localPlayer ) if health > 100 then health = 100 end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight local blinktime1 = elm.vblinktime1 local blinktime2 = elm.vblinktime2 if getTickCount () %blinktime1 < blinktime2 and health <= 20 and armor <=0 then -- If health is less than 20%, armor is 0%, the health bar will blink by hiding the health bar every 1.5 seconds. else local color1 = getHealthColorInactive(health) local color2 = getHealthColorActive(health) local lineLength1 = width * ( health / 100 ) -- Health bar dxDrawRectangle(xpos,ypos,width,height,color1, false) -- Health inactive bar dxDrawRectangle(xpos,ypos,lineLength1,height,color2,false) --Health active bar end end function drawArmorBar(elm) if getElementData(localPlayer,"HUD_NOARMOR") then return; end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight armor = getPedArmor( localPlayer ) if armor <= 0 then else lineLength2 = width * ( armor / 100 ) -- Armor bar dxDrawRectangle(xpos,ypos,lineLength2,height,tocolor(200,200,200,200),false) -- Armor active bar dxDrawRectangle(xpos,ypos,width,height,tocolor(50,50,50,150),false) -- Armor inactive bar end end function drawMoney(elm) if getElementData(localPlayer,"HUD_NOMONEY") then return; end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight moneycount=getPlayerMoney(localPlayer) money= '$' ..moneycount -- Money dxDrawText(tostring (money),xpos,ypos,width,height,tocolor(0,0,0,200),1.0,"pricedown","right","top",false,false,false) -- Money DX text (shadow) dxDrawText(tostring (money),xpos-2,ypos-3,width-2,height-3,tocolor(0,100,0,220),1.0,"pricedown","right","top",false,false,false) -- Money DX text end function drawWeaponIcon(elm) if getElementData(localPlayer,"HUD_NOWEAPONICON") then return; end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight local weaponID = getPedWeapon (getLocalPlayer()); -- Get weapon ID dxDrawImage(xpos,ypos,width,height,"icons/".. tostring( weaponID ) .. ".png",0.0,0.0,0.0,tocolor(255,255,255,200),false) -- Weapon icons image. Check the icons file if you want to take and replace weapon icons. end function drawWeaponAmmo(elm) if getElementData(localPlayer,"HUD_NOAMMO") then return; end local axpos = elm.vx local aypos = elm.vy local awidth = elm.vwidth local aheight = elm.vheight local ammoinclip = getPedAmmoInClip (getLocalPlayer()) -- The ammo inside the clip local totalammo = getPedTotalAmmo(getLocalPlayer())-getPedAmmoInClip(getLocalPlayer()) -- The total ammo minus ammo inside clip local totalammo2 = getPedTotalAmmo(getLocalPlayer()) local showammo1 = ammoinclip local showammo2 = totalammo local showammo3 = totalammo2 if noreloadweapons [getPedWeapon(getLocalPlayer())] then dxDrawText(tostring (showammo3),axpos[1],aypos[1],awidth[1],aheight[1],tocolor(0,255,255,200),1.0,"bankgothic","right","top",false,false,false) -- No reload weapons (for shotgun, grenades, etc) elseif meleespecialweapons [getPedWeapon(getLocalPlayer())] then else --Weapons that reloads. dxDrawText(tostring (showammo2),axpos[2],aypos[2],awidth[2],aheight[2],tocolor(0,255,255,200),1.0,"bankgothic","right","top",false,false,false) dxDrawText("|",axpos[3],aypos[3],awidth[3],aheight[3],tocolor(255,200,0,200),1.0,"bankgothic","left","top",false,false,false) dxDrawText(tostring (showammo1),axpos[4],aypos[4],awidth[4],aheight[4],tocolor(0,255,255,200),1.0,"bankgothic","left","top",false,false,false) end end function drawTime(elm) if getElementData(localPlayer,"HUD_NOTIME") then return; end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight local hour, mins = getTime () local time = hour .. ":" .. (((mins < 10) and "0"..mins) or mins) -- Time. This one makes the minutes always show by 2 digits (3:05 instead of 3:5) dxDrawRectangle(xpos,ypos,width,height,tocolor(0,0,0,150),false) -- GTA Time DX Rectangle dxDrawText(tostring (time),xpos+2,ypos+3,width+2,height+3,tocolor(250,250,250,200),1.0,"diploma","center","top",false,false,false) -- GTA Time DX text end function drawWantedLevel(elm) if getElementData(localPlayer,"HUD_NOWANTEDLEVEL") then return; end local xpos = elm.vx local ypos = elm.vy local width = elm.vwidth local height = elm.vheight local wantedlevel = getPlayerWantedLevel (getLocalPlayer()) --Getting the player's wanted level. for i = 1, 6, 1 do if i < wantedlevel then dxDrawImage(xpos-21,ypos+i*21,width,height,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) else dxDrawImage(xpos-21,ypos+i*21,width,height,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) end end end ---------------------------------------
-
Casino-I need help for create server side script
Phat Looser replied to Tomek123's topic in Scripting
No, Cow: The correct answer is: "I can, but why should I" -
SlimShady sent the background to me, too. Its from a game I think. I didn't want to use it, since I don't use any login stuff.
-
Finally people working together. I'm using this script in my stealth server at the moment. I never tested it (and scripted it in a minute) but this looks better considering the wanted level. for i = 1 to 6 do if i < wantedlevel then dxDrawImage(sWidth-21,sHeight-iCurrPosition,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) -- Wanted level 1 else dxDrawImage(sWidth-21,sHeight-iCurrPosition,16.0,19.0,"images/star.png",0.0,0.0,0.0,tocolor(0,0,0,100),false) -- Wanted level 1 end iCurrPosition = iCurrPosition + 21; end I like my code like I like my women: effective and cute.
-
Because this one is faster than making a triple-DES implementation in LUA. Also implementing already existing stuff is no-brain. Also, I build the algorithm on the three steps: shuffle, substitute and shift. The only thing you know is that it DOES those three steps, but not HOW. Cracking an algorithm that shuffles is easy. Cracking an algorithm that substitutes is easy, too. Cracking an algorithm that shifts is easy, too. But, until now no one has cracked an algorithm that uses all three of them done after each other, because cracking one of those three mostly is a probabilistic problem. Make the first output look random, and you have a good chance no one can crack it after you did the second round.