Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- //------------------------------------------------------------------------------
- #define rconpassword "changeme"
- //------------------------------------------------------------------------------
- new Logged[MAX_PLAYERS];
- //------------------------------------------------------------------------------
- CMD:tworcon(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /tworcon [password]");
- if(strcmp(params, rconpassword) == 0)
- {
- SendClientMessage(playerid, -1, "{FF0000}You're logged in as 2-RCON");
- Logged[playerid] = 1;
- }
- else
- {
- SendClientMessage(playerid, -1, "{FF0000}WRONG PASSWORD");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- CMD:test(playerid, params[])
- {
- if(IsPlayerRCON(playerid))
- {
- SendClientMessage(playerid, -1, "{FF0000}CONGRATS. YOU'RE LOGGED IN 2-RCON!");
- }
- return 1;
- }
- //------------------------------------------------------------------------------
- stock IsPlayerRCON(playerid)
- {
- if(Logged[playerid] == 1) return true;
- else return false;
- }
- //------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment