Show Posts
|
Pages: [1]
|
1
|
Off Topic / Spam / Hey everybody!
|
on: July 28, 2017, 09:04:01 pm
|
So, a few days ago, Kewun threatened me on my LU roleplay server, saying he would keep crashing the players on it. After 10 minutes of terrorizing my server, I patched all the tricks he tried in an hour of scripting, and he is afraid to join now.
I had 8 players on yesterday for a couple of hours, while he sat alone in his server. Just thought everyone should know.
And Kewun, since I know you're reading this: Like I told you before, I am the best. You were lucky not to have dealt with me as a server owner before. You messed with all the other servers but never had to face mine. Now that you have, I've put you in your place. Please, find more hacks so I can fix them too.
|
|
|
2
|
Scripting / Script Releases / GTA V Spawn Camera
|
on: February 08, 2017, 05:58:58 am
|
I got bored and decided to make a spawn camera like the one in Grand Theft Auto V. You know ... the one where it goes into birds-eye view like the old GTA, then changes a couple of times, each getting closer to the player until finally showing the player and restoring control. Usually a little dialog in there too, but I didn't recreate that lol. So behold, the same spawn camera for Liberty Unleashed! Just plug and play, pretty much. Script folder into server, add to content.xml, and so on. A couple of things though: The draw distance sucks for GTA III, so I had to bring the camera view way down. In GTA V they usually start with the whole city or an entire region of the rural area, before making their way down to the smaller area where the player is. This spawn camera I made starts in the small area, and works down from there. Not exactly the same but it's pretty neat though. Second, normal spawn with the control key is blocked. Use the following snippet of code to use the new spawn camera: GTAVSpawn ( Player pPlayer , Vector pVector ); Anyway, here's the link to the source. Available on GitHub. https://github.com/VortrexFTW/lu_gtavspawncamEasy peasy. Enjoy!
|
|
|
3
|
Liberty Unleashed / Suggestions / LU Cloud Data
|
on: October 19, 2016, 07:03:47 pm
|
Okay ... so I've seen this in a multiplayer mod for Mafia II, and while I haven't used it yet, it seems like a really good idea. They have a server registration system, where you have to register your server on their website before it is public and/or on the master list. Quoted from their website: If you want to have your server accessible on the Internet, you have to register it. This system help us to increase quality servers and permit us to ban cheaters.
Now, I think this could be applied to another aspect: players. A registration ability via some "master system" hosted by LU, where players register their account, validate a PC/IP/LUID/etc before being able to play on a server.
For server owners, I think this should be optional though, in case they want to allow non-registered or banned players on their server. Not sure why any server owner would want this (I sure wouldn't), but should be up to them. Also good for offline or LAN servers.
Think of it like Minecraft and their master account thing. I think it would be helpful in keeping the hackers at bay.
|
|
|
4
|
Scripting / Scripting Discussion / Some ways for server owners to troll hackers ...
|
on: February 18, 2016, 04:04:34 am
|
Hackers ... we all hate them. Teleporting, god mode, and the arrogance. Some even have the ability to block being kicked, which makes things increasingly difficult for server owners when they decide to wreak havoc upon the servers.
I thought of a couple of ways for server owners to fire back at them, but I need some thoughts. If you have any other methods, feel free to post in this topic.
First, what about sync? The onPlayerUpdate isn't perfect, but it could potentially work. If a player is designated as a hacker, then deny their sync packets with a return 0;
How about trapping them in a different virtual world? All vehicles, players, scripted objects and more will be completely invisible and inaccessible to them. This would be my preferred method.
What do you think? Shout out some ideas! I can already foresee some flaming and arguing, so please keep this thread civil and on topic.
|
|
|
5
|
Scripting / Script Tutorials / Bitwise Operations
|
on: May 22, 2014, 01:51:59 am
|
I am writing this tutorial today to assist scripters with learning how to use bitwise operators. If you don't know what a bitwise operator is, or how to use them, view the wikipedia article at: http://en.wikipedia.org/wiki/Bitwise_operationIt should help explain the use of these operations. You might have used a bitwise operator before, as the client-side key state change function in LU uses them. For this tutorial, I will be using the example of an admin permissions system. Lets say we have a few things that admins on your server can do: - Kick - Ban - Freeze - Mute - Teleport We can define these things inside an enum, and give each one a name: enum AdminFlagTypes { Kick = 1, Ban = 2, Freeze = 4, Mute = 8, Teleport = 16 }
You might have noticed that I increased the number by doubling it from the last one. This is required for the bitwise operations to be used. Start with 1, and work your way up. Remember, there is a limit, as the LU server is 32 bit only and therefore can only use a number that is less than 32 digits long. Now, onto the actual operations ... There are four main types of operators: "AND" "OR" "XOR" "NOT" The "AND" operator is used via an ampersand (&). The "OR" operator is used via a pipe (|) The "XOR" is used via the caret (^) The "NOT" operator is used via a tilde (~) Lets create an array that holds admin permissions for players: AdminFlags <- array( 128 , 0 ); Okay, so we have our flag types enum and admin flags for each player created. When a player connects, you can load their permissions straight into their slot in the array. It will be in the form of an integer that ranges from 1 to 32 digits in length. For now, we are going to assume that no player has any permissions set. We can add some by using the "OR" operator. You can make a command that allows you to kick other players: function onPlayerCommand( player , command , params ) { switch( command.tolower( ) ) { case "allowkick": AdminFlags[ player.ID ] <- AdminFlags[ player.ID ] | AdminFlagTypes.Kick; break; } }
Note that only one pipe is used here. This is appending the Kick flag onto your flags. To remove a flag, you have to use the AND, and NOT operator. If you don't have the flag set, then this will have no effect. function onPlayerCommand( player , command , params ) { switch( command.tolower( ) ) { case "denykick": AdminFlags[ player.ID ] <- AdminFlags[ player.ID ] & ~AdminFlagTypes.Kick; break; } }
This is pretty much saying "AdminFlags should equal the current AdminFlags and NOT the Kick flag" Now, what happens when we want to see if you have the kick flag? function onPlayerCommand( player , command , params ) { switch( command.tolower( ) ) { case "cankick": if( AdminFlags[ player.ID ] & AdminFlagTypes.Kick ) { // You have the kick flag } else { // You do NOT have the kick flag } break; } }
In a more english set of terms, this is saying "If the AdminFlags are set AND have a Kick flag present, then they can kick, otherwise (else) they cannot kick" This may seem pretty complicated to most, but using it for a while will be a bit wise (pun intended). To store permissions, all you need to do is save the number that AdminFlags[ player.ID ] has. Thanks for reading!
|
|
|
6
|
Off Topic / General Chat / VRocker Hosting
|
on: April 23, 2014, 07:16:20 am
|
Yeah, I think this has been asked somewhere else at one point but I can't find it now.
How long does it usually take for a VRocker Hosting LU package to be re-activated? I submitted the payment on the 18th of April. and attempted several times on IRC to communicate to somebody about this, but to no success. I have also sent an email to the address shown on the contact page.
VRocker, would it be possible to make this an automated process?
|
|
|
7
|
Liberty Unleashed / Liberty Unleashed Chat / My Idea of Roleplay
|
on: December 08, 2013, 06:34:36 am
|
Okay, I have decided to post this, to see what people think. I have clashed with a couple of RP developers in the past, because of my different ideas on RP. I want to explain what I believe RP should be.
First of all, I am all about redefining roleplay. If you join (almost) any SA-MP server, you have the basics. OOC and IC chats, along with the ability to own a business, house, a few cars, etc.
However, this severely limited.
See, I believe that an RP server should allow the players to have an unlimited amount of possibilities, instead of a script dictating that a user can't players can only hold a specific job or own a certain amount of businesss or whatever. My goal, is to allow players to be able to do what they want, where they want, and how they want to do it ... at any given point in time.
I am sick of "admins trump all". Server staff intervention should be minimal, and mostly to deal with immediate situations such as a hacker or something. I've seen so many servers that look like crap because the server owner decided to lead the police department and remove whoever was already there, simply because "he can". I hate how admins think they need to manage a mafia even though the leader isn't even an admin (again, because "they can"). The mafia owner doesn't need nor want this at any cost, but really can't do anything about it.
Now, I have (and always will) believe that even strict RP should be more action based. Grand Theft Auto in it's entirety was built for this. Whoever came up with the fetish that you have to "type a player into submission" should /me run away from Vortrex ... since /do Vortrex appears to be holding a shotgun.
Now, don't get off on the wrong foot with this. I'm not saying that you can never use /me or /do again. I'm just saying that maybe chasing somebody down the street and trying to type "/me takes out a pistol from under his shirt" might be a little awkward once the guy gets away.
Tell me what you all think ...
|
|
|
8
|
Scripting / Script Snippets / Simple 3D Text Labels
|
on: July 26, 2013, 07:23:29 am
|
Okay, so after messing with some client features I found a neat and simple way to create 3D Text Labels. For those who don't know, this is a feature found in SA-MP that allows a server to create a label in the game world (instead of on the screen as HUD or something).
For the following snippet, and as far as LU goes, this is not limited to just labels. You could probably put images, windows of information and other things in the actual game world itself. This could be useful for putting clan logo's on top of player heads (which in my opinion, would make the word awesome an understatement). For now, I will just give you the snippet for labels and you can do the rest if you want.
To use this, just add the following snippet into a client script and use the following command: /addlabel <text>
Keep in mind that the label disappears after you get too far away (15 units). It will reappear when you are in range.
This is tested as of a moment ago, and works smoothly on my PC.
function onClientCommand( command , params ) { if( command.tolower( ) == "addlabel" ) { if( params.len( ) > 0 ) { local label = GUILabel( VectorScreen( 0 , 0 ) , ScreenSize( params.len( ) * 12 , 0 ) , params ); label.FontName = "Courier New"; label.FontSize = 12; label.Colour = Colour( 255 , 255 , 255 ); AddGUILayer( label ); if( label ) { Labels[ label.ID ] <- { }; Labels[ label.ID ].GamePos <- FindLocalPlayer( ).Pos; Labels[ label.ID ].Label <- label; Message( "[#00FF00]SUCCESS: [#FFFFFF]Label added!" ); } else { Message( "[#00FF00]ERROR: [#FFFFFF]Could not add the label!" ); } } else { Message( "[#999999]USAGE: [#FFFFFF]/addlabel <message>" ); } } }
function onScriptLoad( ) { Labels <- { }; }
function onClientRender( ) { if( Labels.len( ) > 0 ) { foreach( ii , vv in Labels ) { if( GetDistance( FindLocalPlayer( ).Pos , vv.GamePos ) < 15 ) { if( !vv.Label.Visible ) { vv.Label.Visible = true; } vv.Label.Pos = WorldPosToScreen( vv.GamePos ); } else { vv.Label.Visible = false; } } } }
|
|
|
9
|
Scripting / Script Snippets / Vortrex's Helpful Snippets
|
on: March 14, 2013, 05:27:57 pm
|
Here's a couple of snippets for everybody to enjoy.
First, here's a function to return the vector in front of a vector. All you need to calculate this is the current position to get the front of, the angle to calculate, and the distance away from the current position. This function can be used on both server and client side (depending on what script you put it in).
function GetVectorInFrontOfVector(vector,angle,distance) { angle = angle * PI / 180; local x = (vector.x + ((cos(angle + (PI/2)))*distance)); local y = (vector.y + ((sin(angle + (PI/2)))*distance)); return Vector(x,y,vector.z); } Below is the same type of function, but is used to get a vector behind a vector.
function GetVectorBehindVector(vector,angle,distance) { angle = angle * PI / 180; local x = (vector.x + ((cos(-angle + (PI/2)))*distance)); local y = (vector.y + ((sin(-angle + (PI/2)))*distance)); return Vector(x,y,vector.z); }
|
|
|
10
|
Scripting / Script Help / File Reading/Writing
|
on: February 16, 2013, 06:25:16 am
|
I have a quick question about file reading/writing. I cannot seem to figure out how to take a normal file and outputting its contents and other manipulations that I may need.
I downloaded a GeoLite database with some GeoIP information. It's in the form of a CSV (Comma Seperated Value) file. I know how to parse this using Squirrel, so I don't need any help there.
My question is, how do I output the file to a variable or something, so I can further process it? It's in the form of an instance.
I hope its not something that's right under my nose, but I'm assuming I'm just missing something simple.
Thanks in advance, Vortrex
|
|
|
11
|
Liberty Unleashed / Liberty Unleashed Chat / About a banned user
|
on: February 15, 2013, 10:27:35 pm
|
I was in-game earlier with KewunBM (however you spell that). He is asking if it is possible to unban him. After a rather annoying little chat which consisted mostly of spamming and caps-lock, I decided to post this so somebody would know. I got a screenshot as well, which was taken after he told me that there was no expiration (which quite frankly, I can easily understand why). Anyway, he explained something about a proxy. I don't know the inner workings of this forum software, so I figured this should be mentioned so further action can be taken if necessary. Also, this user in-game mentioned the KewunBM forum account specifically, although I don't know if I'm spelling it correctly.
|
|
|
12
|
Scripting / Scripting Discussion / Player/Vehicle Classes
|
on: April 05, 2012, 09:30:04 pm
|
Hey, not sure how this works, but so far I think that its not possible.
I have a little knowledge of how classes work in Squirrel. I was wondering, because after reading over the section in the Squirrel 2 and 3 manual's, I am under the assumption that I won't be able to add more methods to a LU built class when running the server. I have a little example of how I was wanting to do it:
Lets say a player connects. His instance is created (for things like player.Pos). I was wondering, can I add more stuff to this instance? Like, if I wanted to preserve their password, use things like player.Password, and be able to read/write the string to it?
Also, I was wondering if it would be possible to add extra functions to it, like for a player instance to have like, player.SaveToDatabase(); or something.
Any support on this would be appreciated, thanks! [GLT]WtF
|
|
|
13
|
Scripting / Scripting Discussion / IP to Country (GeoIP)
|
on: December 22, 2011, 06:43:22 pm
|
I've never worked with any C language, so I don't know how to build modules for LU, so I decided to take another route to getting a country name from an IP address. Currently, I am using a custom PHP socket server that listens on a certain port for incoming connections and data from already established connections.
As of now, the socket listens for something like "GEOIP 127.0.0.1". This server will send the name of the country back to the socket, which could be used to display a user's country on player join or something.
Anybody who is interested in using this, feel free. I am making this service public for all, so you can translate an IP to a country name in your script.
Here is a Squirrel snippet to help (if you need it):
function GeoIPProcess(socket,data) { LAST_COUNTRY <- data; }
function onScriptLoad() { GeoIPSocket <- NewSocket("GeoIPProcess"); GeoIPSocket.Connect( "206.217.206.245", 2302 ); LAST_COUNTRY <- ""; }
function onPlayerConnect(player) { GeoIPSocket.Send("GEOIP " + player.IP); }
function onPlayerJoin(player) { Message(player.Name + " has joined the server from " + LAST_COUNTRY,Colour(255,255,255)); }
|
|
|
14
|
Off Topic / General Chat / About forum accounts
|
on: December 03, 2011, 07:46:28 pm
|
Hey, I'm trying to change my forum account.
I attempted to delete my account 'Vortrex', and I want to change this accounts name to Vortrex, since this is my main account.
I put the account 'Vortrex' in for deletion, and wondered, is it possible to merge all the posts to this account ([GLT]WtF)
|
|
|
15
|
Scripting / Script Help / Loading Vehicles using Script
|
on: June 08, 2011, 05:15:45 pm
|
Hello everybody. I am new to Squirrel, but have used a few other languages similar to it, like Lua and such.
My question is this: I am wanting to load vehicles using the script so I can add more data to it (like the owner of a vehicle, for example). As I am used to Lua, which I can create a table to store this data, I am not sure how this works in Squiirel. I am able to make the tables and such, but im not sure how to index them and create the vehicles. Here is what I have so far:
function LoadVehicleFromSQL() { sqlite_query(database,"ALTER TABLE vehicles AUTO_INCREMENT=1"); local amount = sqlite_query(database,"SELECT count(*) FROM vehicles"); local vehicle = 0; if(amount) { for(i = 1;i = amount;i++) { local query = sqlite_query(database,"SELECT model,x,y,z,a,color1,color2,owner,faction,job,locked,engine,lights FROM vehicles WHERE id = " + i); vData[i] <- {}; vData[i].Model <- sqlite_column_data(query,0); vData[i].X <- sqlite_column_data(query,1); vData[i].Y <- sqlite_column_data(query,2); vData[i].Z <- sqlite_column_data(query,3); vData[i].A <- sqlite_column_data(query,4); vData[i].Color1 <- sqlite_column_data(query,5); vData[i].Color2 <- sqlite_column_data(query,6); vData[i].Owner <- sqlite_column_data(query,7); vData[i].Faction <- sqlite_column_data(query,8); vData[i].Job <- sqlite_column_data(query,9); vData[i].Engine <- sqlite_column_data(query,10); vData[i].Lights <- sqlite_column_data(query,11); sqlite_free(query); vehicle = CreateVehicle(vData[i].Model,Vector(vData[i].X,vData[i],Y,vData[i].Z),vData[i].A,vData[i].Color1,vData[i].Color2); vehicle.Locked = vData[i].Locked; vehicle.SetEngineState = vData[i].Engine vehicle.LightState = vData[i].Lights } } } I am not sure how to index this table (should it be by the increment in the for loop, or by the instance created from the vehicle?)
The only conclusion I have about this is: I create the tables, and index them by ID, not the instance, then I could use vehicle.ID in the index like: vData[vehicle.ID].Model
Any help or information on this is greatly appreciated. I am probably doing it wrong, but Im not sure how to add other info to the vehicle instance (so it could be like vehicle.Owner, or vehicle.Price or something)
Thanks, WtF
|
|
|
|