Advertisement
Guest User

OPSex - v1.0

a guest
Oct 15th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. //OnPlayerSpawn Ex - by Romel
  2.  
  3. #include <a_samp>
  4.  
  5. #define FIRST_SPAWN 0
  6. #define SEC_SPAWN 1
  7.  
  8. new varSpawn[MAX_PLAYERS] = FIRST_SPAWN;
  9.  
  10. forward OnPlayerSpawnEx(playerid, hasspawned);
  11.  
  12. public OnPlayerConnect(playerid)
  13. {
  14. varSpawn[playerid] = FIRST_SPAWN;
  15. return 1;
  16. }
  17.  
  18. #if defined _ALS_OnPlayerConnect
  19. #undef OnPlayerConnect
  20. #else
  21. #define _ALS_OnPlayerConnect
  22. #endif
  23. #define OnPlayerConnect OPSex_OnPlayerConnect
  24.  
  25. forward OPSex_OnPlayerConnect(playerid);
  26.  
  27. public OnPlayerSpawn(playerid)
  28. {
  29. CallRemoteFunction("OnPlayerSpawnEx", "ii", playerid, varSpawn[playerid]);
  30. varSpawn[playerid] = SEC_SPAWN;
  31. return 1;
  32. }
  33.  
  34. #if defined _ALS_OnPlayerSpawn
  35. #undef OnPlayerSpawn
  36. #else
  37. #define _ALS_OnPlayerSpawn
  38. #endif
  39. #define OnPlayerSpawn OPSex_OnPlayerSpawn
  40.  
  41. forward OPSex_OnPlayerSpawn(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement