Guest User

2-RCON, © HY, 2015.

a guest
Mar 15th, 2015
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. //------------------------------------------------------------------------------
  5.  
  6. #define rconpassword "changeme"
  7.  
  8. //------------------------------------------------------------------------------
  9.  
  10. new Logged[MAX_PLAYERS];
  11.  
  12. //------------------------------------------------------------------------------
  13.  
  14. CMD:tworcon(playerid, params[])
  15. {
  16. if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /tworcon [password]");
  17. if(strcmp(params, rconpassword) == 0)
  18. {
  19. SendClientMessage(playerid, -1, "{FF0000}You're logged in as 2-RCON");
  20. Logged[playerid] = 1;
  21. }
  22. else
  23. {
  24. SendClientMessage(playerid, -1, "{FF0000}WRONG PASSWORD");
  25. }
  26. return 1;
  27. }
  28.  
  29. //------------------------------------------------------------------------------
  30.  
  31. CMD:test(playerid, params[])
  32. {
  33. if(IsPlayerRCON(playerid))
  34. {
  35. SendClientMessage(playerid, -1, "{FF0000}CONGRATS. YOU'RE LOGGED IN 2-RCON!");
  36. }
  37. return 1;
  38. }
  39.  
  40. //------------------------------------------------------------------------------
  41.  
  42. stock IsPlayerRCON(playerid)
  43. {
  44. if(Logged[playerid] == 1) return true;
  45. else return false;
  46. }
  47.  
  48. //------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment