Advertisement
JonathanFeitosa

[SAMP] Som Perto

Jan 21st, 2014
546
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.20 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new bool: NaoFloda[MAX_PLAYERS] = false;
  4. main()
  5. {
  6.         print("\n----------------------------------");
  7.         print(" Criado Por: Jonathan Feitosa");
  8.         print("----------------------------------\n");
  9. }
  10.  
  11. public OnPlayerConnect(playerid)
  12. {
  13.     SetTimerEx("Funciona", 1000, true, "i", playerid);
  14.     return true;
  15. }
  16.  
  17. public OnPlayerDisconnect(playerid)
  18. {
  19.     KillTimer(Funciona(playerid));
  20.     return true;
  21. }
  22.  
  23. forward Funciona(playerid);
  24. public Funciona(playerid)
  25. {
  26.     new Float:CorX = 1013.6484, Float:CorY= -1302.5164, Float:CorZ = 13.3828, Float:Distancia = 30.0;
  27.     if(NaoFloda[playerid] == false)
  28.     {
  29.         if(IsPlayerInRangeOfPoint(playerid, Distancia, CorX, CorY, CorZ))
  30.         {
  31.             NaoFloda[playerid] = true;
  32.             PlayAudioStreamForPlayer(playerid, "https://www.dropbox.com/s/vuf806hcazqilih/Psirico%20-%20Lepo%20Lepo%20-%20NOVA%20-%20Na%20Pegada.Net.mp3?dl=1", CorX, CorY, CorZ, Distancia, 1);
  33.         }
  34.     }
  35.     if(NaoFloda[playerid] == true)
  36.     {
  37.         if(!IsPlayerInRangeOfPoint(playerid, Distancia, CorX, CorY, CorZ))
  38.         {
  39.             NaoFloda[playerid] = false;
  40.             StopAudioStreamForPlayer(playerid);
  41.         }
  42.     }
  43.     return true;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement