Advertisement
FStralioti

Sistema de VIP 0.1 - Fábio Stralioti

Mar 8th, 2015
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.66 KB | None | 0 0
  1. /* Filterscript Sistema de VIP 0.1 Feito por : Fábio Stralioti
  2. Iniciado dia 08/03/2015 as 12:30
  3.  
  4. ******** ************ *********  **** *************
  5. ******** ************ *********  **** *************
  6. ****     ****    **** ****   **  **** *****   *****
  7. ****     ****    **** ****   **  **** *****   *****
  8. ******** ************ *********  **** *****   *****
  9. ******** ************ *********  **** *****   *****
  10. ****     ****    **** ****   **  **** *****   *****
  11. ****     ****    **** *********  **** *************
  12. ****     ****    **** *********  **** *************
  13.  
  14. */
  15.  
  16. #include <a_samp>
  17. #include <zcmd>
  18. #include <sscanf>
  19. #include <dof2>
  20.  
  21. enum pINFO {
  22.     pVIP
  23. };
  24. new Stralioti[MAX_PLAYERS][pINFO];
  25. new stralioti[128];
  26. new Id;
  27. new nivel;
  28.  
  29. public OnPlayerConnect(playerid) {
  30.     format(stralioti, sizeof(stralioti), "VIPS/%s.ini", PlayerNome(playerid));
  31.     if(!DOF2_FileExists(stralioti)) {
  32.         SendClientMessage(playerid, -1,"Você não é VIP");
  33.     }
  34.     else {
  35.         format(stralioti, sizeof(stralioti), "Você é VIP nível %d", nivel);
  36.         SendClientMessage(playerid, -1, stralioti);
  37.     }
  38.     return 1;
  39. }
  40.  
  41. public OnGameModeExit() {
  42.     DOF2_Exit();
  43.     return 1;
  44. }
  45.  
  46. CMD:setvip(playerid, params[]) {
  47.         if(!IsPlayerAdmin(playerid))
  48.             return SendClientMessage(playerid, -1, "Você não é um Administrador Logado Na RCON");
  49.         if(sscanf(params, "ud", Id, nivel)) return SendClientMessage(playerid, -1,"Use /setvip [id] [nivel]");
  50.         if(!IsPlayerConnected(Id))
  51.             return SendClientMessage(playerid, -1, "Este jogador não está online.");
  52.         format(stralioti, sizeof(stralioti), "O %s deu VIP Nível %d para %s", PlayerNome(playerid), nivel, PlayerNome(Id));
  53.         SendClientMessageToAll(-1, stralioti);
  54.         format(stralioti, sizeof(stralioti), "VIPS/%s.ini", PlayerNome(playerid));
  55.         DOF2_CreateFile(stralioti);
  56.         DOF2_SetInt(stralioti, "Level", Stralioti[playerid][pVIP]);
  57.         DOF2_SaveFile();
  58.         return 1;
  59. }
  60.  
  61. CMD:retirarvip(playerid, params[]) {
  62.         if(!IsPlayerAdmin(playerid))
  63.             return SendClientMessage(playerid, -1, "Você não é um Administrador Logado Na RCON");
  64.         if(sscanf(params, "u", Id)) return SendClientMessage(playerid, -1,"Use /retirarvip [id]");
  65.         if(!IsPlayerConnected(Id))
  66.             return SendClientMessage(playerid, -1, "Este jogador não está online.");
  67.         format(stralioti, sizeof(stralioti), "O %s retirou o VIP do %s", PlayerNome(playerid), PlayerNome(Id));
  68.         SendClientMessageToAll(-1, stralioti);
  69.         format(stralioti, sizeof(stralioti), "VIPS/%s.ini", PlayerNome(playerid));
  70.         DOF2_RemoveFile(stralioti);
  71.         return 1;
  72. }
  73.  
  74. PlayerNome(playerid) {
  75.     new nomeplayer[MAX_PLAYER_NAME];
  76.     GetPlayerName(playerid, nomeplayer, sizeof(nomeplayer));
  77.     return nomeplayer;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement