JUNINHOO_COLDPLAY

[FS] Labirinto Rockstar 1.0

Feb 18th, 2012
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.65 KB | None | 0 0
  1. // Filterscript feito por JUNINHOO_COLDPLAY
  2. /*LABIRINTOOOOOOO*/
  3. //NÃO REMOVA OS CRÉDITOS SEJA ÉTICO
  4. //http://divulguegameplay.blogspot.com/
  5. /*CRÉDITOS
  6. Feito por: JuNiNhoo_COLDPLAY*/
  7.  
  8.            
  9. #define FILTERSCRIPT
  10.  
  11. #include <a_samp>
  12.  
  13. #if defined FILTERSCRIPT
  14. #define COR_3DLABEL 0xFFFFFFAA
  15.  
  16. new EmDialog[MAX_PLAYERS];
  17. new string[128];
  18. new sendername[MAX_PLAYER_NAME];
  19. new gNews[MAX_PLAYERS];
  20. forward OOCNews(COLOR,const string[]);
  21. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  22.  
  23. public OnFilterScriptInit()
  24. {
  25.     //3dTextLabel
  26.     Create3DTextLabel("{FF0000}Chegou no fim do Labirinto\n{FFFF00}Parabéns\n{4B0082}Digite /fim",COR_3DLABEL,4500.7197,-1296.2067,20.8903,10.0,0);//labirinto
  27. //Pickup======================================================================================================================
  28.     AddStaticPickup(1318, 23, 4500.7197,-1296.2067,20.8903); // Labirinto
  29. //============================================================================================================================
  30. //veiculos labirinto
  31.     AddStaticVehicleEx(522,3661.69995117,-2282.10009766,291.39999390,334.00000000,-1,-1,15); //NRG-500
  32.     AddStaticVehicleEx(522,3662.30004883,-2283.80004883,291.20001221,333.99536133,-1,-1,15); //NRG-500
  33.     AddStaticVehicleEx(522,3663.30004883,-2286.19995117,291.10000610,333.99536133,-1,-1,15); //NRG-500
  34.     AddStaticVehicleEx(522,3664.69995117,-2288.10009766,290.89999390,333.99536133,-1,-1,15); //NRG-500
  35.     AddStaticVehicleEx(522,3666.00000000,-2289.50000000,290.79998779,333.99536133,-1,-1,15); //NRG-500
  36.     AddStaticVehicleEx(522,3667.60009766,-2290.80004883,290.60000610,333.99536133,-1,-1,15); //NRG-500
  37.     AddStaticVehicleEx(522,3668.50000000,-2291.89990234,290.60000610,333.99536133,-1,-1,15); //NRG-500
  38.     AddStaticVehicleEx(522,3670.00000000,-2292.50000000,290.50000000,333.99536133,-1,-1,15); //NRG-500
  39.     AddStaticVehicleEx(521,3671.80004883,-2293.10009766,290.29998779,342.00000000,-1,-1,15); //FCR-900
  40.     AddStaticVehicleEx(521,3674.19995117,-2293.69995117,290.20001221,341.99890137,-1,-1,15); //FCR-900
  41.     AddStaticVehicleEx(521,3676.60009766,-2293.89990234,289.89999390,341.99890137,-1,-1,15); //FCR-900
  42.     AddStaticVehicleEx(568,3674.00000000,-2276.39990234,291.20001221,268.00000000,-1,-1,15); //Bandito
  43.  
  44.     return 1;
  45. }
  46.  
  47. public OnFilterScriptExit()
  48. {
  49.     return 1;
  50. }
  51.  
  52. #endif
  53.  
  54. public OnPlayerCommandText(playerid, cmdtext[])
  55. {
  56. if (strcmp("/labirinto", cmdtext, true, 10) == 0)
  57. {
  58. TogglePlayerControllable(playerid, 0);
  59. ShowPlayerDialog(playerid,2999,DIALOG_STYLE_LIST,"Labirinto Rockstar","LABIRINTO\nDesligar","Aceitar","Cancelar");
  60. EmDialog[playerid] = 1;
  61. return 1;
  62. }
  63.  
  64. if(strcmp("/fim", cmdtext, true) == 0 && PlayerToPoint(3.0, playerid,4500.7197,-1296.2067,20.8903))
  65. {//Mensagem e Premio labirinto
  66. GetPlayerName(playerid,sendername,sizeof(sendername));
  67. format(string, sizeof(string), "[AVISO] %s Chegou no fim do Labirinto Rockstar e ganho 20k!.", sendername);
  68. OOCNews(0xFF0000,string);
  69. SendClientMessage(playerid, 0xFFFFFFAA, "Ganho 20k por Chegar no fim do labirinto!");
  70. GameTextForPlayer(playerid, "~r~Par~w~a ~y~Bens", 5000, 1);
  71. GivePlayerMoney(playerid, 20000);
  72. SetPlayerPos(playerid,3676.0088,-2276.2605,290.8437);
  73. }
  74. if(!strcmp(cmdtext,"/fimlabirinto",true))
  75. {
  76. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-2,"só admin RCON pode usar este comando!");
  77. SetPlayerPos(playerid,4500.7197,-1296.2067,20.8903);//labirinto FIM
  78. SetPlayerInterior(playerid,0);
  79. }
  80. return true;
  81. }
  82.  
  83.  
  84. public OnRconCommand(cmd[])
  85. {
  86.  return 1;
  87. }
  88.  
  89. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  90. {
  91.      //dialog LABIRINTO
  92.     if(dialogid == 2999)
  93.     {
  94.         TogglePlayerControllable(playerid, 1);
  95.         if(!response) { return 1; }
  96.         switch(listitem)
  97.         {
  98.             case 0:
  99.             {
  100.                 ShowPlayerDialog(playerid,2898,DIALOG_STYLE_LIST,"Labirinto° By:JuNiNhoo_COLDPLAY","Labirinto Rockstar\nVoltar Los Santos","Selecionar","Voltar");
  101.             }
  102.             case 2:
  103.             {
  104.                 DisablePlayerCheckpoint(playerid);
  105.             }
  106.         }
  107.     }
  108.     if(dialogid == 2898)
  109.     {
  110.         TogglePlayerControllable(playerid, 1);
  111.         EmDialog[playerid] = 0;
  112.         if(response == 0) { return ShowPlayerDialog(playerid,2599,DIALOG_STYLE_LIST,"Teleporte Labirinto","Labirinto Rockstar\nLos Santos\nDesligar","Aceitar","Cancelar"); }
  113.         switch(listitem)
  114.         {
  115.             case 0:
  116.             {
  117.                 ResetPlayerWeapons(playerid);
  118.                 SetPlayerInterior(playerid,0);
  119.                 GetPlayerName(playerid,sendername,sizeof(sendername));
  120.                 format(string, sizeof(string), "[AVISO] %s foi para o Labirinto Rockstar!.", sendername);
  121.                 OOCNews(0x2993EDAA,string);
  122.                 SetPlayerPos(playerid,3676.0088,-2276.2605,290.8437);//labirinto
  123.             }
  124.             case 1:
  125.             {
  126.                 SetPlayerInterior(playerid,0);
  127.                 SetPlayerPos(playerid,1493.9459,-1738.5125,13.5469);//ls
  128.             }
  129.         }
  130.     }
  131.     return 1;
  132. }
  133. public OOCNews(COLOR,const string[])
  134. {
  135.     for(new i = 0; i < MAX_PLAYERS; i++)
  136.     {
  137.         if(IsPlayerConnected(i))
  138.         {
  139.             if(!gNews[i])
  140.             {
  141.                 SendClientMessage(i, COLOR, string);
  142.             }
  143.         }
  144.     }
  145. }
  146. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  147. {
  148.     if(IsPlayerConnected(playerid))
  149.     {
  150.         new Float:oldposx, Float:oldposy, Float:oldposz;
  151.         new Float:tempposx, Float:tempposy, Float:tempposz;
  152.         GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  153.         tempposx = (oldposx -x);
  154.         tempposy = (oldposy -y);
  155.         tempposz = (oldposz -z);
  156.         //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  157.         if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  158.         {
  159.             return 1;
  160.         }
  161.     }
  162.     return 0;
  163. }
Advertisement
Add Comment
Please, Sign In to add comment