Monday, 22 June 2015

Bank System (Jakwob Edit)

Hi guys i was browsing the SA-MP forums and found this cool fiterscript from a member called UltraScripter, i posted to him and told him his code was good and easy for newbies to work with, in the replies to his topic some members were asking him to make the bank have a interior, and he then went on to tell them he wanted it commands only, and thats all he was doing, so i took it upon myself to show the other comment posters that its easy to add the interior. So when i started i was flooded with ideas, so here is what i have came up with.

Original Post here.
UltraScripter SA-MP Profile Click Here
Jakwob's SA-MP Profile Click Here

Features:

  • Bank Assistants (Actors)
  • Bank Interior
  • Withdraw Money
  • Deposit Money
  • Check Balance
Commands:
  • /gotobank
  • /changelog
  • /balance
Requirements:

Installation:
  • Note: All the required includes and plugins are provided with this download.
  1. Copy all the files provided into the correct folders.
  2. Add the required plugins into the server.cfg file
  3. Add "Bank" to the filterscritpt line in the server.cfg
  4. Add "BankAccounts" folder to scriptfiles folder if you have not done so.
  5. Compile the Bank.pwn
  6. Run your server.
  7. Enjoy the filterscript.

Credits:
UltraScripter - For the original code.
Jakwob - For the Bank interior, bank assistants and his Message2.inc.
Southclaw - for his Southclaw's Interaction Framework.
Zeex - For the command processor.
y_less - for his YSI and his sscanf.


Downloads:
Bank.zip (solidfiles)

Screenshots




Saturday, 20 June 2015

Message2.inc

This is the update version of Message.inc.

At the top of your code use #include <message>

Features:

  • Creates an indiviual textdraw for cetian messages
  • Prevents chat spam of unwanted messages



Requirements:


  • zcmd.inc  // #include this into your gamemode before the Message2.inc (without this the include will not function).
  • sscanf2.inc // #include this into your gamemode before the Message2.inc (without this the include will not function).
  • sscanf.dll/.so // Dont forget to put this in your plugin folder and write on the line "plugins" on your server.cfg.


Message Styles:

  • MSG_STYLE_ERROR    1
  • MSG_STYLE_INFO     2
  • MSG_STYLE_USAGE    3



Functions:

  • SendServerMessage(playerid, msgstyle, const message[]);
  • CreateMessageTextDraw(playerid); // Place under OnPlayerConnect(playerid) Otherwise the textdraws will not show
  • DestroyMessageTextDraw(playerid); // Place Under OnPlayerDisconnect(playerid, reason) Otherwise the textdraws will not show


Commands:


  • /msgpos - Usage /msgpos [Custom X] [Custom Y].
  • /defaultmsg


Download:
Message2.inc (solidfiles)
Message2.inc (pastebin)

ChangeLog 20/06/2015


  • Rewrote code to make it more user friendly.
  • Removed textdraws that was not needed.
  • Fixed timer bug.
  • Recolored some of the message titles.
  • Removed some timers.
  • Added Message Styles.
  • Removed SendErrorMessage.
  • Removed SendInfoMessage.
  • Removed SendUsageMessage.
  • Added new Function SendServerMessage.
  • Added checks to see if there is already a TD timer running.
  • New command to change the position of the textdraw so its in your ideal place.
  • New default position command to place your textdraw back to the default position.
  • Added checks to the X, Y positions.


ScreenShot:








Thanks for taking time to look at my work!

Tuesday, 16 June 2015

Message.inc

Message.inc


Hey this is my first include, im sorry if anyone thinks this is useless, but i had the idea to prevent the chat in game being spammed by unwanted messages, and usage messages so i made them as a textdraw to show near the map and disappear after 5 seconds.

At the top of your code use #include <message>

Features:

  • Creates an indiviual textdraw for cetian messages
  • prevents chat spam of unwanted messages



Functions:

  • SendErrorMessage(playerid, const message[]);
  • SendUsageMessage(playerid, const message[]);
  • SendInfoMessage(playerid, const message[]);
  • CreateMessageTDs(playerid); // Place under OnPlayerConnect(playerid) Otherwise the textdraws will not show
  • DestroyMessageTDs(playerid); // Place Under OnPlayerDisconnect(playerid, reason) Otherwise the textdraws will not show


Download:
Message.inc (solidfiles)
Message.inc (pastebin)

ScreenShot:


Note: All comments are welcomed but please instead of posting bad comments, please tell me how i can improve the preformance.

Thanks for taking time to look at my work!