Guest User

TESTTW

a guest
Aug 22nd, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. #define DIALOG_TESTTW 9999
  2. daca ai pe enum {
  3. DIALOG_TESTTW
  4.  
  5. Daca ai pe switch
  6. case DIALOG_TESTTW:
  7. {
  8. new string[150];
  9. if(!response)
  10. {
  11. new
  12. Float:PosAdmin[3],
  13. adminid = GetPVarInt(playerid, "AdminNoob");
  14. GetPlayerPos(adminid, PosAdmin[0], PosAdmin[1], PosAdmin[2]);
  15. SetPlayerPos(adminid, PosAdmin[0], PosAdmin[1], PosAdmin[2]);
  16. format(string, sizeof(string), "%s a acceptat cererea de test teamviwer",GetName(playerid));
  17. SCM(adminid, -1, string);
  18. format(string, sizeof(string), "Ai acceptat cererea de test teamviwer de la adminul %s.",GetName(adminid));
  19. SCM(playerid,-1,string);
  20. SCM(playerid,-1,"Ai fost teleportat cu succes!");
  21. }
  22. else
  23. {
  24. format(string, sizeof(string), "Ban: %s has been banned by AdmBot, reason: Necooperare admin(TW).", GetName(playerid));
  25. BanEx(playerid, "Necooperare admin(TW)");
  26. SendClientMessageToAll(COLOR_LIGHTRED, string);
  27. }
  28. }
  29. Daca nu in loc de case pui if(dialogid == DIALOG_TESTTW)
  30.  
  31. Comanda:
  32.  
  33. CMD:testtw(playerid, params[])
  34. {
  35. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
  36. if(IsPlayerConnected(playerid))
  37. {
  38. if(PlayerInfo[playerid][pAdmin] >= 1)
  39. {
  40. new id,string[100];
  41. if(sscanf(params,"u",id)) return SCM(playerid, -1, "/testtw <Name/PlayerID");
  42. if(id == playerid) return SCM(playerid, -1, "Nu poti folosi aceasta comanda pe tine.");
  43. if(IsPlayerConnected(id))
  44. {
  45. if(id != INVALID_PLAYER_ID)
  46. {
  47. format(string, sizeof(string), "Admin-ul %s te-a tras la teste teamviwer.",GetName(playerid));
  48. ShowPlayerDialog(id, DIALOG_TESTTW, DIALOG_STYLE_MSGBOX, "Test Teamviwer", string, "Accepta", "Refuza");
  49. SetPVarInt(id,"AdminNoob",playerid);
  50. }
  51. }
  52. else return SCM(playerid, -1, "Acel player nu este conectat.");
  53. }
  54. else return SCM(playerid, -1, AdminOnly);
  55. }
  56. return 1;
  57. }
Advertisement
Add Comment
Please, Sign In to add comment