[Tutorial] How to use y_ini
#5

Hello everyone,

I made a command for players, to load a file. They just write the file name and the file is supposed to be loaded, but instead, the LoadObj callback is called many many times and the message (Look LoadObj callback) is sent so many times, so the chat is spammed.

In short: I call the LoadObj callback once, and it gets spammed.

Help, please.

Here's the function to call LoadObj:
PHP Code:
INI_ParseFile(filename"LoadObj", .bExtra true, .extra playerid, .bPassTag true); 
And here's the LoadObj function:
PHP Code:
forward LoadObj(playeridtag[], name[], value[]);
public 
LoadObj(playeridtag[], name[], value[])
{
    new 
objectsstrrr[128];
    
INI_Int("totalobjects"objects);
    
format(strrrsizeof(strrr), "{00FFFF}[DEBUG]{FFFFFF} there are {FF0000}%d{FFFFFF} objects"objects);
    
SendClientMessage(playerid, -1strrr);
        return 
1;

Reply


Messages In This Thread
How to use y_ini - by Misiur - 14.04.2015, 17:21
Re: How to use y_ini - by Trollerz - 07.09.2015, 17:15
Re: How to use y_ini - by AlexandreAymanito - 07.09.2015, 19:22
Re: How to use y_ini - by saffierr - 01.01.2016, 21:00
Re: How to use y_ini - by Viggo - 31.01.2018, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)