SA-MP Forums Archive
[FilterScript] RealVehicle 1.0.1 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] RealVehicle 1.0.1 (/showthread.php?tid=537996)

Pages: 1 2


RealVehicle 1.1.1 - EnforcerDon - 19.09.2014

RealVehicle 1.1.1


New Update Version 1.1.1 (24-September-2014) updates Version 1.1.0 (23-September-2014)For those who preferred the excessive-looking textdraws, they are not available in this version, however will be restored as an option in my next release


version 1.0.1
OK, so I've been having a go at sa-mp scripting (I already have knowledge programming C++), and I've made this filterscript that implements a fuel system (with fuel stations and everything) and a few related commands on a server. I am currently developing this, and expect to release upgraded versions in the near future, but for now I am releasing version 1.0.1 to the community. Please be aware that this is my first sa-mp filterscript release, so there are some inefficiencies/bugs in this version that I am aware of, but I will not be patching, because they are caused by redundant code that is being addressed in the next version, which will have a number of new features (in relation to dynamic vehicle management).

However, having said that, you are welcome to give feedback for improvements or things you think I should add in the next version, just be aware that I won't be fixing bugs in this version - any issues that you post will be considered for version 1.1.0.


Documentation

Documentation of the commands and any other important information is also included in the download zip file
CommandsThe commands are explained in a little more detail in the readme file, but you can just look through the source to find what they are anyway.


Download

(latest) Version 1.1.1
Download zip of source and amx from digiforce.bytesoftwaretech.com/realvehicle.php?id=sampforum

Version 1.1.0
Download zip of source and amx from digiforce.bytesoftwaretech.com/realvehicle.php?id=sampforum
pastebin is no longer available, due to the increased number of include files required - The zip file provides all the includes/plugins required, so if your server doesn't have one of the realvehicles dependencies, you don't have to download them separately.

Version 1.0.1
Download zip of .pwn source and .amx from http://digiforcecreations.eu.pn/file...hicle-1.0.1.7z
*edit* link to pastebin http://pastebin.com/7ChF6sqj

You are free to use this code and alter it to suit your requirements, however please do not redistribute. If you do happen to use this on your server, I would appreciate it if you could let me know, purely for statistical purposes. Overall, I hope this is helpful, and as always, have fun!




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Insert deep philosophical statement here...



Re: RealVehicle 1.0.1 - Ox1gEN - 19.09.2014

A pastebin with the code would be appreciated.


Re: RealVehicle 1.0.1 - EnforcerDon - 19.09.2014

Alright, it seems people here like to use pastebin, I will make a link to that too...


Re: RealVehicle 1.0.1 - TheStoNe - 20.09.2014

Oh, really-really nice.

Thanks, keep up the good work


Re: RealVehicle 1.0.1 - EnforcerDon - 20.09.2014

Quote:
Originally Posted by TheStoNe
Посмотреть сообщение
Oh, really-really nice.

Thanks, keep up the good work
No problem, glad you found it helpful.

For those of you who liked this release, keep watching this thread, because I plan to release version 1.1.0 in the next few days.

List of updates/improvements for RealVehicles 1.1.0 (not yet released) *update*


Re: RealVehicle 1.0.1 - Dangjai - 21.09.2014

Nice


Re: RealVehicle 1.0.1 - Pottus - 21.09.2014

You made a critical mistake when you made those textdraws any static non-changing textdraws should be normal textdraws and you only need to create one static textdraw for all players any other textdraws that change on a per-player basis should be player textdraws. This script from my count could only work with a maximum of 100 players as you have it coded 20x100 = 2000.

Another thing you should really do is use a command processor like zcmd it will organize your commands a lot of effectively.


Re: RealVehicle 1.0.1 - EnforcerDon - 21.09.2014

Quote:
Originally Posted by Pottus
Посмотреть сообщение
You made a critical mistake when you made those textdraws any static non-changing textdraws should be normal textdraws and you only need to create one static textdraw for all players any other textdraws that change on a per-player basis should be player textdraws. This script from my count could only work with a maximum of 100 players as you have it coded 20x100 = 2000.

Another thing you should really do is use a command processor like zcmd it will organize your commands a lot of effectively.
Thanks for your comment, this is really good feedback. I was not aware of the textdraws problem, so I will look into it and correct it in my next release.

As for the command processor, I am switching to dcmd.


Re: RealVehicle 1.0.1 - Pottus - 21.09.2014

dcmd is old as the hills use zcmd or ycmd in fact you should really have YSI for any development you do.

https://github.com/Y-Less/YSI

Command example zcmd/ycmd style:

pawn Код:
CMD:kill(playerid, params[])
{
    SetPlayerHealth(playerid, 0.0);
    SendClientMessage(playerid, 0xFF0000FF, "You killed yourself");
    return 1;
}



Re: RealVehicle 1.0.1 - EnforcerDon - 21.09.2014

Quote:
Originally Posted by Pottus
Посмотреть сообщение
dcmd is old as the hills use zcmd or ycmd in fact you should really have YSI for any development you do.

https://github.com/Y-Less/YSI

Command example zcmd/ycmd style:

pawn Код:
CMD:kill(playerid, params[])
{
    SetPlayerHealth(playerid, 0.0);
    SendClientMessage(playerid, 0xFF0000FF, "You killed yourself");
    return 1;
}
Actually, I had already implemented dcmd into my code before you mentioned it, however I will take your advice and switch to zcmd (apparently its faster), but that's not a priority, because dcmd already looks a lot more tidy.


Re: RealVehicle 1.0.1 - Pottus - 21.09.2014

I would suggest just going with the zcmd method since this is what you should really be using for anything you release anyways might as well start


Re: RealVehicle 1.0.1 - EnforcerDon - 21.09.2014

Quote:
Originally Posted by Pottus
Посмотреть сообщение
I would suggest just going with the zcmd method since this is what you should really be using for anything you release anyways might as well start
Thanks for your comments, your feedback is much appreciated and I will take your suggestions into account Nice server btw


Re: RealVehicle 1.0.1 - EnforcerDon - 22.09.2014

Update released - realvehicles version 1.1.0

check the new link I added to this thread. Pastebin is no longer available, as my code has become more complicated with the new features.


Re: RealVehicle 1.0.1 - Pottus - 22.09.2014

The textdraws are still incorrect you need to use player textdraws read about it here.

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw


Re: RealVehicle 1.0.1 - KayJ - 22.09.2014

Good Job


Re: RealVehicle 1.0.1 - EnforcerDon - 23.09.2014

Quote:
Originally Posted by Pottus
Посмотреть сообщение
The textdraws are still incorrect you need to use player textdraws read about it here.

https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw
I released the wrong file - "display_adv.inc" should not have been included in the release, because as you pointed out it is not correct.

Here is a corrected version of that file http://pastebin.com/QgRNNB25

EDIT** Sorry people, I'm having a really bad day, that one wasn't correct either, but it should be now


Re: RealVehicle 1.0.1 - Pottus - 23.09.2014

Quote:
Originally Posted by EnforcerDon
Посмотреть сообщение
I released the wrong file - "display_adv.inc" should not have been included in the release, because as you pointed out it is not correct.

Here is a corrected version of that file http://pastebin.com/QgRNNB25
One more issue.

pawn Код:
new PlayerText:vehStatsDisplayAdvanced_ptxt[12];
This is an issue because depending on how filterscripts are loaded/unloaded it can change the order of textdraw ids which could result in incorrect referencing for players with textdraws already created you need to change this to accommodate each player.

pawn Код:
new PlayerText:vehStatsDisplayAdvanced_ptxt[MAX_PLAYERS][12];



Re: RealVehicle 1.0.1 - EnforcerDon - 23.09.2014

Quote:
Originally Posted by Pottus
Посмотреть сообщение
One more issue.

pawn Код:
new PlayerText:vehStatsDisplayAdvanced_ptxt[12];
This is an issue because depending on how filterscripts are loaded/unloaded it can change the order of textdraw ids which could result in incorrect referencing for players with textdraws already created you need to change this to accommodate each player.

pawn Код:
new PlayerText:vehStatsDisplayAdvanced_ptxt[MAX_PLAYERS][12];
I see, will fix that too. Thanks for your help, once again!

EDIT** for the (I think third time?), here is the corrected file http://pastebin.com/QgRNNB25. I will do a patch release tonight, because I've fixed a few other bugs as well.


Re: RealVehicle 1.0.1 - Vishalshetty - 23.09.2014

ITS A VERY NICE FS....

im definitely adding it to my server!!!


Re: RealVehicle 1.0.1 - EnforcerDon - 23.09.2014

Quote:
Originally Posted by Vishalshetty
Посмотреть сообщение
ITS A VERY NICE FS....

im definitely adding it to my server!!!
Thanks mate