Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Sa-Mp Include SchleifenID
- *
- * (c) by Kaliber, 2013
- *
- */
- #include <a_samp>
- static a_ID;
- forward _OnPlayerConnect(playerid);
- #if defined _ALS_OnPlayerConnect
- #undef OnPlayerConnect
- #else
- #define _ALS_OnPlayerConnect
- #endif
- #define OnPlayerConnect _OnPlayerConnect
- public OnPlayerConnect(playerid) {
- new a_ID = playerid;
- if(a_ID > h_ID) h_ID = a_ID;
- return CallLocalFunction("_OnPlayerConenct", "i", playerid);
- }
- forward _OnPlayerDisconnect(playerid,reason);
- #if defined _ALS_OnPlayerDisconnect
- #undef OnPlayerDisconnect
- #else
- #define _ALS_OnPlayerDisconnect
- #endif
- #define OnPlayerDisconnect _OnPlayerDisconnect
- public OnPlayerDisconnect(playerid,reason) {
- if(playerid >= h_ID)
- {
- for(new i; i<h_ID; i++) {
- if(IsPlayerConnected(i)) h_ID = i;
- }
- }
- return CallLocalFunction("_OnPlayerDisconenct", "ii", playerid, reason);
- }
- stock GetID() {
- return h_ID;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement