[INFO]Function
#1

and can be used in CallLocalFunction onplayerconnect calling and disconnect everything? if you do me an example?
Reply
#2

I guess you can. It would be something like this: CallLocalFunction("OnPlayerConnect","d",playerid);
Reply
#3

but so would the whole loop
Reply
#4

pawn Код:
CallLocalFunction("MyFunction","d",playerid);

forward MyFunction(playerid);
public MyFunction(playerid)
{
    return 1;
}

You need something like these?
Reply
#5

intent using a streamer like this ..

Код:
public OnPlayerConnect(playerid)
{
	if(!IsPlayerNPC(playerid))
	{
		Streamer_AddPlayer(playerid);
	}
	if(...)
	{
		return CallLocalFunction(..., ..., playerid);
	}
	return 1;
}
Код:
public Streamer_OnPlayerConnect(playerid)
{
//functions here
	return 1;
}
Reply
#6

You want to hook a function?
pawn Код:
public OnPlayerConnect( playerid )
{
    // Do something

    if ( funcidx( "OnPlayerConnect" ) != -1 )
        return CallLocalFunction( "Streamer_OnPlayerConnect", "i", playerid );
}

#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif

#define OnPlayerConnect Streamer_OnPlayerConnect

forward Streamer_OnPlayerConnect( playerid );
Now you can add it at your include, without "Add this : abcdefg_GameModeInit( );".
Reply
#7

and so would be fine? in onplayerdisconnect how do I? however, where we wrote the comment / / Do something I put all the functions normally? : \
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)