The online racing simulator
Musing about having full access to the LFS Engine, through a PAWN API.
Doing so on the fly would be nice ... I really, really wish he had the same level of power as AMX Mod had ... 8 years ago ... over the Half Life engine. I don't want to be constrained, it's stops innervation.
Awesome will be Tweak by InSim. You can set power, weight and other details of car by packet. First power and weight will be ok, later other variables. AMXX support setting everything like speed, gravity and other stuff - for player or for everyone both.
Quote from misiek08 :Awesome will be Tweak by InSim. You can set power, weight and other details of car by packet. First power and weight will be ok, later other variables. AMXX support setting everything like speed, gravity and other stuff - for player or for everyone both.

This is what I want. Full control over the engine. If they provide it on a packet interface, that would be fine, but I think that allowing direct access into the engine, via say a DLL that we can override, or something we can hook, I think that would be awesome. I agree that allowing action on a per use basis can cause admins to cheat, but I feel that problem is negligible with allowing people to acquire how to use say DRS, or KERS. I think that would be awesome.
Yeah, KERS in LFS.... awesome but maybe next 2 years ( I hope it will be faster ).

I like the idea with InSim, not with DLL because you can not control DLL on user's side.
Well, that really depends on how the functions work. For example, if I have a function on the server side like setPlayerSpeed(uint8 PLID); then it would be reported to all client's, via for example a packet, and the server would know because it would be the one telling the clients. The only problem with this system is that it would only work on one server at a time.
So it's ok. User is entering my server, and he have 0.8 speed, and on your server he get's 1.2 speed. Same like in Amxx
Yeah, it would be like ...

<?php 
onPlayerMove
(PLID) {
    new 
plSpeedCurrentplSpeedNew;
    
getPlayerSpeed(PLIDplSpeedCurrent);
    
plSpeedNew plSpeedCurrent 1.2;
    
setPlayerSpeed(PLIDplSpeedNew);
}
?>

Not pretty, but that's small for ya.
No! Im making plugins for CS and you need to set speed on a spawn (some ppl says that only on connect but on spawn is better).

<?php 
function onNPL($PLID){
 
$this->setPlayerSpeed($PLID$this->getPlayerSpeed($PLID)*1.2);
}
?>

I would love to see how this would work in practice.
There's 1 problem. We are talking about Speed so it's bad point. Better will be:

<?php 
function onNPL($PLID){
 
$this->setPlayerPower($PLID$this->getPlayerPower($PLID)*1.2);
 
$this->setPlayerWeight($PLID$this->getPlayerWeight($PLID)*0.6);
}
?>

Setting speed is like nitro, so it's good too, but better will be this one above. It can handle nitro and KERS too with setting higher values with timeout for 3-5 seconds and setting values back again.
I think that for the sake of say, KERS, we would need a command interface for knowing when a player hit a button, or if we don't get that, then we would have to be able to send console type commands to the server in much the same way that we send admin commands. This would mean that we can bind a button to do the command `/kers_on` and then have another button for `/kers_off`, or make the function circular so it binds `/kers_on` but once you depress the button it sends the command, then binds `/kers_off` to that button, once you press `/kers_off` then it binds `/kers_on` again.

You would then programmaticlly intercept this within the program were it would detect the keypress, or the sent command, and simply add 80BHP to the engine for X number of seconds. (While the key is pressed, while the command is sent, or one time, while the kers_off command has not yet been sent.) From here, the code is a simple as:


<?php 
onKersActivation
(PLID) {
    new 
currentHPnewHP;
    
currentHP getPlayerHP(PLID);
    
newHP currentHP 80;
    
setPlayerHP(PLIDnewHP);
}

onKersDeactivation(PLID) {
    new 
currentHPnewHP;
    
currentHP getPlayerHP(PLID);
    
newHP currentHP 80;
    
setPlayerHP(PLIDnewHP);
}
?>

I'm going to split this topic now ... Because we are getting very off topic.
User bind's "/i kers" or "!kers" to button and then in plugin:
1. receive command
2. check user can use kers
3. if user can use kers set higher power and set timer for few seconds (it's can be setted up)
4. Timer is setting back the power

I know, that in real world you can control KERS and you dont have to use all the KERS power on 1 time but my version will be good too, it will change a lot of things in LFS, becuase we will be able to simulate car wear (GT) during the race lowering power by 0.001 or something like that. Tuning will be allowed too.

FGED GREDG RDFGDR GSFDG