12.08.2011, 16:24
and can be used in CallLocalFunction onplayerconnect calling and disconnect everything? if you do me an example?
CallLocalFunction("MyFunction","d",playerid);
forward MyFunction(playerid);
public MyFunction(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
Streamer_AddPlayer(playerid);
}
if(...)
{
return CallLocalFunction(..., ..., playerid);
}
return 1;
}
public Streamer_OnPlayerConnect(playerid)
{
//functions here
return 1;
}
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 );