The online racing simulator
LFSLapper Soccer Addon
Hello Everyone,

I like to release a new version of this SoccerAddon for LFSlapper.

##########################
#HOW TO INSTALL THE ADDON (More infomation in the Readme.txt file)
##########################
-Be Sure you have the latest version of LFSLapper: https://www.lfs.net/forum/thread/58433-Release.
-Copy and Paste the 'soccer' folder into the Includes Folder. (LFSLapper folder\bin\default\includes)
-Open the "addonsused.LPR" file (LFSLapper folder\bin\default\includes\addonsused.LPR) and add the following lines:

include( "./Soccer/AdminMenu.lpr");
include( "./Soccer/Global.lpr");
include( "./Soccer/PlayerList.lpr");
include( "./Soccer/SetDetection.lpr");
include( "./Soccer/VoteSystem.lpr");

To (De)Activate the Socceraddon ingame: Type !socceron/!socceroff
Restart the race or type !startsoccer to start a game.

Have Fun.
===========================
Changelog
===========================
V0.2:
  • New Hitball Detection system: Uses the Carcontact insimpacket instead of my own hitballdetection system

    CatchEvent OnCarContact($PlayerA,$PlayerB,$PlayerA_Speed,$PlayerB_Speed,$PlayerA_X,$PlayerB_X,$PlayerA_Y,$PlayerB_Y)
    EndCatchEvent


    To use this script you must have/download LFSLapper version 7.0.4.3
  • Automatically Spawn car(The Ball) to center when making a goal. (DONE)
    Can be turned off/on in adminmenu (DONE)
  • New commands to start/stop a game. (!startsoccer / !stopsoccer).(DONE)
  • Small Bugfixes.
V0.3: Updated for the newest LFSLapper versions
To use this version you must have/download LFSLapper version 7.0.4.4 or higher
  • -Goal/center coordinates doesnt work with the versions of LFSLapper lower than 7.0.4.4
V0.4: Minor bugfixes. (01-04-2018)
  • -Fix: Error while loading stored GoalCoordinates
  • -Fix: Error while start Socceraddon with !socceron
  • -Fix: Error when "The Ball" respawns to the center
  • -Update: Disabled Next/Previous page button in Load GoalCoordinates
V0.5: More Minor bugfixes. (02-04-2018)
  • -Fix: !socceroff , playerbuttons doesnt disappear
  • -Fix: Error when entering the adminpanel.
  • -Fix: Upper TeamName buttons didnt change after changing Teamname
  • -Fix: Some commands could be executed by non-admins
  • -Fix: SpawnToCenter command could be executed by guests
  • -Fix: Could start a soccergame without a ball.
  • -Fix: Could start a soccergame without any players in the teams.
  • -Fix: Error while stopping the soccergame.
  • -Fix: VoteWindow: Buttons with playernames didnt close.
Attached images
Soccer_1.jpg
Soccer_2.jpg
Soccer_3.jpg
Attached files
BL4_BD_Soccer.lyt - 6.9 KB - 350 views
LFSLapper_SoccerAddon_V0.5.zip - 13.6 KB - 315 views
Wow, nice idea and some great screenshots.
Thx Yisc[NL]

i'm trying to implement the Soccermode into my current Destruction Derby/Cop & Robber mode. Takes a while to change the code and get it working. It was easier to make it from scratch :P.
Very nice idea !!! Would be great if we would be able to add a "real" soccer ball ... Should be fun ! Smile

+1 for your idea Smile
Well it whould be nice if we could select opjects(Tires or haystack) that you set as NON disappearing/refreshing opject. So that use that opject as "ball". Because for a soccergame you need atleast 3 drivers now.
otherwise you have 2 drivers or you can play with yourself.
Quote from Bass-Driver :Well it whould be nice if we could select opjects(Tires or haystack) that you set as NON disappearing/refreshing opject. So that use that opject as "ball". Because for a soccergame you need atleast 3 drivers now.
otherwise you have 2 drivers or you can play with yourself.

Object physics are not synced once you collide with an object. So that wouldn't work.
Nice Big grin
Update:

After rewriting the soccerscript because i was so stupid to not backup my devlapper.
i whould like to show you what i have so far.

Features so far:

For the players:
-Timer(DONE)
-Goal scoring buttons(DONE)
-Who scored the goal:hit detection (DEV/TEST)
-Userlist to see who's in which team and who's the ball(DONE)
-Choosing Team window incl command to switch teams(DONE)
-Votingwindow WHO'S THE BALL(DONE)
-Votingwindow CARS(DEV)
-FAQ: for new players (Pending)

For admins:

Menu:(DEV)
-Activate Votingwindow BALL/CARS(DEV).
-Several commands: Adding goals manually, Set Red/blue centerpoint zones(DONE)
-Give Names to Teams (DONE)
-Store/load zones (with names) (Future release)
-Move players to blue or red team
Attached images
soccer.png
teams.jpg
soccer12.png
-
(Bass-Driver) DELETED by Bass-Driver : Not ready for testing yet sorry
Whould like to ask 1 or 2 patient players to test the basics of my soccer script.

Things that need to be tested:

-Ball detection: if there's no ball detected a vote screen popup to select a player(the ball). The player with the most votes will be the ball.

-Team selecting menu: Selecting in which team you want to be.
-Scoring:

and several small things.

Server:DanTaco's DevServer
Download system please?
soccerscript is not ready for releasing. Alot of features have to be added en tested.
currelty i'm building a script that detect hitting the ball. (Blue Team scored by USER)
The code is ready but need to be tested, so that i can implement the code into the soccescript.
Attached images
Test.jpg
After some adjustments on the testing code and testing with some players, i can say, it ready to be implemented into the soccerscript.
Status update:
Fixed bugs:

-User got specced when voted to be the ball (UF1) but already had a UF1.
-Spamming messages when The Ball stand on centerpoint.
-Changed teamnames wasnt visible in TeamSelection menu and when a team scored.

Added Features:
Hit Detection: when a team is scoring , it shows the user who hit the ball as last ( Still in testfase).



I like to test the current system, before i add other features.

Features i like to add:

-Playerscoring points: how many times a player scored.
-Rounds: Team win with the most points after (for example 3 rounds) (total score or 1 point for each winning game)
-Car selecting menu. Dont know about this

Your comments and suggestions are welcome
Attached images
aaaa.jpg
Nice project you have there, keep up the good work.
I just noticed an error in the screenshot of code.
It says: $distuser = ($distY*distY) + ($distY*distY);
Unless I'm missing something, I suspect you need to do something with $distX at some point.
Thx Yisc[NL]
The code above is already edited and implemented into the script.
I noticed it after i uploaded the picture XD.

After some testing (with 1 player :S) it worked as it should be.
i really hope that lapper wont lag with many players in the server.

I've tried to add the CarContact Packets into the LFSLapper.exe
i failed because at some point i dont know where/how to add code. Tongue
Update status:

-Added Rounds options (Option in Adminmenu)
The team that each round wins get 1 point. The team with the most points after (for example 3 rounds) wins.
-Timelimit/GoalLimit option (Option in Adminmenu)
-Scoring/teambuttons design changed.
-Small bugs fixed.
Attached images
soccer13.png
Another Update status:

-Added simple helpmenu with instructions and commands.
-Added variable that counts scoring of each player. For now hattrick message has been added.
Playerstats will be implemented after good testing.
Update:
- Menu to set the locations of the goals/centerpoints.

I'm currently working on the store/load option.

The locations will be stored into a textfile.
This will be usefull is you want to share the locations with other users.
Attached images
Naamloos1.jpg
I spotted a small spelling issue.
It says "Store coordinations" instead of "Store coordinates".
Other then that, keep up the good work and you know where to find me if help is needed in any way.
After some time not working on the soccer addon for lapper. I have made a functional design to load the stored coordinates from the textfile.
Attached images
1.png
2.png
-
(mikail669220) DELETED by Bass-Driver
Changing languages is on my todo list. But i will not going to add this feature atm. There are important things i have to finish to release the first version of this addon.
LFSLapper Soccer_Addon Version 0.1
Hello everyone.

I like to release the very first version of my soccerscript.

This means that you may expect bugs.
Open the ReadMe file inside the 'soccer'folder to read the instructions to set the goals.

##########################
#HOW TO INSTALL THE ADDON
##########################
-Be Sure you have the latest version of LFSLapper.
-Copy and Paste the 'soccer' folder into the Includes Folder. (LFSLapper6.014v15\bin\default\includes)
-Open the "addonsused.LPR" file (LFSLapper6.014v15\bin\default\includes\addonsused.LPR) and add the following lines:

include( "./includes/Soccer/Global.lpr");
include( "./includes/Soccer/AdminMenu.lpr");
include( "./includes/Soccer/PlayerList.lpr");
include( "./includes/Soccer/VoteSystem.lpr");
include( "./includes/Soccer/SetDetection.lpr");

To (De)Activate the Socceraddon ingame: Type !socceron/!socceroff
Restart the race to start a game.

Have Fun.

Please report bugs and do not try to fix them by your own.
####################################################################################
Features:

-Adminmenu
-Menu to Set/Store/Load goal positions.
-Small Helpmenu
-Automatic ball detection
-Player/Team List
-Hit Detection.
-Scoring/Timer buttons
-
(mikail669220) DELETED by Bass-Driver : user used cracked LFS
I'm not sure if demo users can use this addon properly, because they cannot use/build layouts.
-
(mikail669220) DELETED by Bass-Driver
Sorry, but i do not understand what you mean.
Could you try explain it in a differend way.

EDIT:

The picture that you are showing. Is my layout with you driving on it.
Demousers may not use/build layouts.
I would thank success Smile
1

FGED GREDG RDFGDR GSFDG