[INFO]Function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [INFO]Function (
/showthread.php?tid=276148)
[INFO]Function -
TheBluec0de - 12.08.2011
and can be used in CallLocalFunction onplayerconnect calling and disconnect everything? if you do me an example?
Re: [INFO]Function -
[MG]Dimi - 12.08.2011
I guess you can. It would be something like this: CallLocalFunction("OnPlayerConnect","d",playerid);
Re: [INFO]Function -
TheBluec0de - 12.08.2011
but so would the whole loop
Re: [INFO]Function -
DRIFT_HUNTER - 12.08.2011
pawn Код:
CallLocalFunction("MyFunction","d",playerid);
forward MyFunction(playerid);
public MyFunction(playerid)
{
return 1;
}
You need something like these?
Re: [INFO]Function -
TheBluec0de - 12.08.2011
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;
}
Re: [INFO]Function -
Basicz - 13.08.2011
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( );".
Re: [INFO]Function -
TheBluec0de - 13.08.2011
and so would be fine? in onplayerdisconnect how do I? however, where we wrote the comment / / Do something I put all the functions normally? : \