-
Posts
168 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Nighthawk
-
Ok, i added in core/modules/Aircraft_Condition a file called Aircraft_Condition.php. Now i have to fly. Oh, i found a failure in the above script Wrong: if($pirepdata->landingrate > 1 && $pirepdata->landingrate <-500) Right: if($pirepdata->landingrate < 1 && $pirepdata->landingrate >-500) Because the Landing Rate is negative!
-
<?php /** * phpVMS - Virtual Airline Administration Software * Copyright (c) 2008 Nabeel Shahzad * For more information, visit www.phpvms.net * Forums: http://www.phpvms.net/forum * Documentation: http://www.phpvms.net/docs * * phpVMS is licenced under the following license: * Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) * View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/ * */ class Aircraft_Condition extends CodonModule { public function __index() { CodonEvent::addListener('Aircraft_Condition'); } public function EventListener($eventinfo) { if($eventinfo[2] == 'pirep_filed') //Retrieve the aircraft info based on the aircraft id stored in the pirep row $aircraft = BuysellData::getAircraftByReg($pirepdata->registration); //Figure out the $cond that needs to be placed into the if($pirepdata->landingrate > 1 && $pirepdata->landingrate <-500) $cond = $aircraft->cond -20; else $cond = 50; $params = array ( 'id' => $aircraft->id, 'cond' => $cond, 'minrank' => $aircraft->minrank, 'enabled' => $aircraft->enabled, ); $update = BuysellData::editAircraft($params); } } I wil try this
-
grrrr. i havent enough time to test it grrrr
-
Have u installed the beta phpvms version? If not, u have problems. Read the Readme carefully!!!
-
My Aircraft Buying mod is now on Github: https://Nighthawk666...-Buying-mod.git We all can work on this, to advance this mod.
-
Oh nice, i find this topic now... @Jakes: This generates Random conditions for the different Aircrafts new/ used/ retired. Used and retired are only Placeholder to Buy used AC ( cheaper). Thats all- And for my Aircraft Buying mod i Bypass the operationsdata.class. The changes are in Buyselldata.class. And u are right , i have added the colomn cond in the database and some other that i need. At #14 u must use Buyselldata.class instead of operationsdata.class. In Operationsdata.class is no cond. operationsdata.class= buyselldata.class (extended) operations.php = Buysell.php (extended) i want to buypass the original files, to simple delete the mod... An example post #50 OperationsData::editAircraft(array( 'id' => THE ID 'cond' => $cond )); The right use is : BuysellData::editAircraft(array( 'id' => THE ID 'cond' => $cond )); it´s only an example, i dont know if this will work on this point... My Aircraft Buying mod is now on Github: https://Nighthawk666@github.com/Nighthawk666/Aircraft-Buying-mod.git We all can work on this, to advance this mod.
-
@Jacques: Yes , that is the way i want to go, but i find the right thing...
-
The Sql batch file is in the .zip of this project, when u want to use this mod u must add lines/ colomns in your database. The simpliest way is to make a sql batch file that make the changes. I use navicat for this. It´s very simple to handle to me because i have more then one database on my servers ;-). Navicat is free for homeuse. In navicat is an option "run sql batch file", u choose the file and whoops all changes are done
-
The calculation is only when you buy an aircraft or lease one.
-
Step 1: Aircraft buying Mod >>> please Delete<<<
Nighthawk replied to Nighthawk's topic in Development Help
It´s under "Releases" in the Forum -
No, thats not implemented in the moment. I am working to find the way ...
-
what you mean with wear factor?
-
The Pricecalculations are very -mmmhhh- raw i think and must reworked but its a start. You can set a price manualy too!
-
Attention!!! In Germany you must pay for it to GEMA (Yes, its like a Webradio, YOu have to buy licenses )!!!! I think it's a nice idea this addon, but please read the rules of your state I want to do something similar some years earlier and ask in some webhoster forums, and all say there "DONT DO IT!". Do it when you want, but beware of Gema! It´s no yoke! IT´s UP TO YOU. Ok, the other thing is, your mod is interesting and looks nice
-
Can you show me please a screeny from the option page and also edit page? You dont have no conds too, show here: You see, my Mooney TR is leased! and my options page: please Look , if you have the colomns "cond" and "price" in your phpvms_aircraft database!
-
Sell it and buy it again...
-
You where to fast , the link above wasnt actual to 0.91 !!!!
-
Hotfix 0.91 is ready for download by the same link, just overwrite the old 0.9. Sorry
-
Holy *****, i changed a file mom!!!!
-
Please make a try and install 0.8 over it (without sql) and then 0.9 again
-
Yes, right! Have u filled all details of the Aircraft when u add it?
-
@Industrialshadow + michael Kraan: please check /admin/modules/Buysell/Buysell.php is on the right place
-
please look in in your phpvms database phpvms_aircrafts if there is already a coloumn named price. Error message tells u, that the coloumn "Price" already existes.
-
@Jeff: He wants that i add him on ICQ and help him there, but i didn´t use ICQ. @Industrialshadow: I didn´t use ICQ. When u want, i can help u over skype or email.
-
To Work with a sql database i use navicat. Its free and easy.