SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 27/03/2020, 09:33 AM   #1
Big Clucker
pollo97's Avatar
Join Date: Sep 2011
Location: Italy
Posts: 83
Reputation: 4
Default Issue on creating DynamicObject using y_hooks

Hi to everyone!
I'm programming using modules and in a first try I separeted my maps in three different files, hooking those to OnGameModeInit callback, but I noticed that only 1000 out of 1300 objects were created.
I tried to move all the maps under OnGameModeInitEx, that is the first OnGameModeInit being called and it worked!
In the 'main.pwn' I've got this code:

#include <a_samp>
public OnGameModeInit()


    #if defined main_OnGameModeInit
        return main_OnGameModeInit();
        return 1;
#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
    #define _ALS_OnGameModeInit
#define OnGameModeInit main_OnGameModeInit
#if defined main_OnGameModeInit
    forward main_OnGameModeInit();
// includes and definitions

    // maps here works
Instead, in one of the map file where I hook OnGameModeInit, the code is:
#include <YSI_Coding\y_hooks>

hook OnGameModeInit()
  // CreateDynamicObject
  return 1;
I want to understand if there are some problems related with streamer and hooks or if is due to my inexperience in hooking callbacks.
pollo97 is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[EasyDB]Creating Issue Yaa Scripting Help 9 03/12/2016 06:38 PM
Dynamicobject on RequestClass DavidBilla Scripting Help 1 12/07/2016 06:27 PM
Dynamicobject Help SequenceCuz Scripting Help 11 13/12/2014 12:21 PM
DynamicObject problem seoseokbin Scripting Help 0 09/03/2013 03:14 PM
Issue creating file Joe Staff Help Archive 6 20/04/2009 02:43 AM

All times are GMT. The time now is 02:49 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.