Disable Ammunation (damm.inc) -
MP2 - 01.02.2012
Disable Ammunation 1.0
by Mike
Introduction
Extremely simple include that disables the scripts inside the ammunation interiors. This is achieved by hooking (y_hooks) OnPlayerInteriorChange, checking if they are entering an interior that an ammunation is in, and setting a repeating timer until they are in the interior, to be safe from lag. 100% effective*.
* Don't quote me on that :x
Changelog
1.0 (1st Feb 2012):
- Initial release
Usage
Just include it and you're good to go!
With this, you can then add your own checkpoint in ammunations to make custom scripts.
Installation
• Download the .inc file below
• Place it in
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include (or where ever your include folder is)
• Add " #include <damm> " at the top of your gamemode under a_samp like so:
Код:
#include <a_samp>
#include <damm>
#include <blahblah>
#include <other_includes>
The order isn't important, just make sure it's
after a_samp.
• Download YSI
HERE
• Nothing more! No functions to use or anything, essentially plug and play.
Download
http://pastebin.com/Y0VHKwsy
No mirrors please. This is my own website, so if the link goes down I'll know about it. If it does however, PM me.
Thank you!
Please leave a comment below, maybe with a suggestion! Don't forget to report any bugs also please.
Thank you.
Re: Disable Ammunation (damm.inc) -
Niko_boy - 01.02.2012
Nice gonna test it sooner!!
Re: Disable Ammunation (damm.inc) -
DRIFT_HUNTER - 01.02.2012
Use hook method by ****** without YSI
pawn Код:
public OnGameModeInit()
{
// myinc OnGameModeInit
return CallLocalFunction("myinc_OnGameModeInit", "");
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit myinc_OnGameModeInit
forward myinc_OnGameModeInit();
Re: Disable Ammunation (damm.inc) -
MP2 - 01.02.2012
I don't understand. If you could edit my code to use that system, I'll give you credit.
Re: Disable Ammunation (damm.inc) -
Konstantinos - 01.02.2012
Quote:
Originally Posted by DRIFT_HUNTER
Use hook method by ****** without YSI
pawn Код:
public OnGameModeInit() { // myinc OnGameModeInit return CallLocalFunction("myinc_OnGameModeInit", ""); } #if defined _ALS_OnGameModeInit #undef OnGameModeInit #else #define _ALS_OnGameModeInit #endif #define OnGameModeInit myinc_OnGameModeInit forward myinc_OnGameModeInit();
|
That the old way of usage. After ****** release the y_hook, you can simply do it as MP2 did it!
pawn Код:
Hook:FileName/* name from .inc */_Callback/* A name from a callback. Ex: OnPlayerConnect( playerid ) */
{
// Code
}
Re: Disable Ammunation (damm.inc) -
Reklez - 23.03.2012
Nice gonna use it for my Roleplay Server
Re: Disable Ammunation (damm.inc) -
Hansolue - 23.03.2012
Nice
Re: Disable Ammunation (damm.inc) -
Ryan_Obeles - 21.05.2013
how about the cluckin bell npc
i would love that with this
Re: Disable Ammunation (damm.inc) -
DiGiTaL_AnGeL - 23.05.2013
By "disabling script in ammunition" you mean the NPC will disappear?