Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new bool: NaoFloda[MAX_PLAYERS] = false;
- main()
- {
- print("\n----------------------------------");
- print(" Criado Por: Jonathan Feitosa");
- print("----------------------------------\n");
- }
- public OnPlayerConnect(playerid)
- {
- SetTimerEx("Funciona", 1000, true, "i", playerid);
- return true;
- }
- public OnPlayerDisconnect(playerid)
- {
- KillTimer(Funciona(playerid));
- return true;
- }
- forward Funciona(playerid);
- public Funciona(playerid)
- {
- new Float:CorX = 1013.6484, Float:CorY= -1302.5164, Float:CorZ = 13.3828, Float:Distancia = 30.0;
- if(NaoFloda[playerid] == false)
- {
- if(IsPlayerInRangeOfPoint(playerid, Distancia, CorX, CorY, CorZ))
- {
- NaoFloda[playerid] = true;
- 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);
- }
- }
- if(NaoFloda[playerid] == true)
- {
- if(!IsPlayerInRangeOfPoint(playerid, Distancia, CorX, CorY, CorZ))
- {
- NaoFloda[playerid] = false;
- StopAudioStreamForPlayer(playerid);
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement