[Include] Disable Ammunation (damm.inc)
#1

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.
Reply
#2

Nice gonna test it sooner!!
Reply
#3

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();
Reply
#4

I don't understand. If you could edit my code to use that system, I'll give you credit.
Reply
#5

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 Код:
#include < YSI/y_hooks >
pawn Код:
Hook:FileName/* name from .inc */_Callback/* A name from a callback. Ex: OnPlayerConnect( playerid ) */
{
    // Code
}
Reply
#6

Nice gonna use it for my Roleplay Server
Reply
#7

Nice
Reply
#8

how about the cluckin bell npc i would love that with this
Reply
#9

By "disabling script in ammunition" you mean the NPC will disappear?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)