SA-MP Forums Archive
[FilterScript] Dynamic Bus System [MySQL-ZCMD] - 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] Dynamic Bus System [MySQL-ZCMD] (/showthread.php?tid=434337)



Dynamic Bus System [MySQL-ZCMD] [Updated 4] - Skyrise - 02.05.2013

* Bus System *
* Theory (aka Skyrise) *

Basic Concept -
MySQL based dynamic bus system.
Dynamically set via admin.
Players can call for a bus at a station - sent to available bus driver.

^^ That was when I thought of it.

What came out:
MySQL based.
Dynamically set.
bMods can be set via RCON Admin.
Simple radio for bus drivers
Drivers can be set by RCON admin. (you can change that for bMods.)
Accounts are automatically made and loaded. No need for integration.
bMod list.
You can /bnear and see if one is nearby.
Call a bus - cancel it.
There was going to be a duty system. Still deciding.

The code was written as-is. None of it was tested.

REQUIREMENTS
SSCANF2
BlueG's Latest MySQL plugin. (r15 or r14 if you're using Linux)
Streamer
Foreach
ZCMD

Find any bugs? Report them on this thread.
[Version 4]
http://pastebin.com/rPa40rcL - Main Script
http://pastebin.com/dKkYJZ68 - bSQL [unchanged]
[Version 3]
http://pastebin.com/Wj6ecrsN - Main Script
http://pastebin.com/dKkYJZ68 - bSQL


Re: Dynamic Bus System [MySQL-ZCMD] - Fredrick - 02.05.2013

hmmm very nice indeed ill test it good work


Re: Dynamic Bus System [MySQL-ZCMD] - bond1999 - 02.05.2013

Nice thought..
I will use it.


Re: Dynamic Bus System [MySQL-ZCMD] - ahmad95 - 02.05.2013

Nice


Re: Dynamic Bus System [MySQL-ZCMD] - Pottus - 02.05.2013

Looks like it's scripted fairly decently one thing though for future reference.

Код:
stock isDriver(playerid)
{
        if(sPlayerInfo[playerid][sDriver] == 1) return 1;
        return 0;
}
If you have something like this use #define

#define isdriver(%0) if(sPlayerInfo[%0][sDriver])

or reference it directly

if(sPlayerInfo[playerid][sDriver])

There is no need for a function.


Re: Dynamic Bus System [MySQL-ZCMD] - Skyrise - 02.05.2013

Thanks.

My reason for using it is because of pure laziness. I got tired of typing it out directly.


Re: Dynamic Bus System [MySQL-ZCMD] - matthew1211 - 02.05.2013

Quote:
Originally Posted by Skyrise
Посмотреть сообщение
* Bus System *
* Theory (aka Skyrise) *

Basic Concept -
MySQL based dynamic bus system.
Dynamically set via admin.
Players can call for a bus at a station - sent to available bus driver.

^^ That was when I thought of it.

What came out:
MySQL based.
Dynamically set.
bMods can be set via RCON Admin.
Simple radio for bus drivers
Drivers can be set by RCON admin. (you can change that for bMods.)
Accounts are automatically made and loaded. No need for integration.
bMod list.
You can /bnear and see if one is nearby.
Call a bus - cancel it.
There was going to be a duty system. Still deciding.

The code was written as-is. None of it was tested.

REQUIREMENTS
SSCANF2
BlueG's Latest MySQL plugin. (r15 or r14 if you're using Linux)
Streamer
Foreach
ZCMD

Find any bugs? Report them on this thread.

http://pastebin.com/Wj6ecrsN - Main Script
http://pastebin.com/dKkYJZ68 - bSQL
can you make an non mysql version aswell


Re: Dynamic Bus System [MySQL-ZCMD] - Skyrise - 02.05.2013

Quote:
Originally Posted by matthew1211
Посмотреть сообщение
can you make an non mysql version aswell
Sorry, I am not going to do that. I feel MySQL is more efficient and easier to work with.


AW: Dynamic Bus System [MySQL-ZCMD] - Mickey227 - 03.05.2013

Better would be a system that requires you to enter commands to create a stop like / abus for the administrator, and then dynamically creates a place to stop. But if you type the command / abus pops up a window to enter the name of the bus stop. After utworzniu stop now, you can use the bus, eg / bus and displays a GUI window that displays a list of stops for the player. The player chooses the second stop and jump out a window that displays information about driving: driving time, charge and name of the stop. For a user to be familiar with it. And the option "go" or return to the list.


Re: Dynamic Bus System [MySQL-ZCMD] - Bhxblu - 04.05.2013

Very Nice Keep it up Dude


Re: Dynamic Bus System [MySQL-ZCMD] - Kittylol - 04.05.2013

Nice,love it !


Re: Dynamic Bus System [MySQL-ZCMD] - Skyrise - 06.05.2013

Thanks everyone.


Re: Dynamic Bus System [MySQL-ZCMD] - Excips - 06.05.2013

nice one.


Re: Dynamic Bus System [MySQL-ZCMD] - Skyrise - 16.05.2013

Update 4 released.


Re: Dynamic Bus System [MySQL-ZCMD] - zDivine - 16.05.2013

Do not post untested code.


Re: Dynamic Bus System [MySQL-ZCMD] - Skyrise - 16.05.2013

Quote:
Originally Posted by zDivine
Посмотреть сообщение
Do not post untested code.
I know what I'm doing. No where does it say I have to test my code. If there are issues, then it will be addressed. It is a contribution to the community and I didn't have time to test it.