Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Tentar com ProxDetector
- */
- #include a_samp
- #include streamer
- #include pawn.cmd
- new SoundBoxArea;
- main(){}
- public OnPlayerEnterDynamicArea(playerid, areaid)
- {
- if(areaid == SoundBoxArea)
- {
- if(!IsValidDynamicArea(SoundBoxArea))
- return 0;
- PlayAudioStreamForPlayer(playerid, "http://live.hunterfm.com/live");
- SendClientMessage(playerid, -1, "* Você entrou em uma área onde tem uma caixa com o som ligado.");
- }
- return 1;
- }
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- if(areaid == SoundBoxArea)
- {
- if(!IsValidDynamicArea(SoundBoxArea))
- return 0;
- StopAudioStreamForPlayer(playerid);
- SendClientMessage(playerid, -1, "* Você saiu de uma área onde tinha uma caixa com o som ligado.");
- }
- return 1;
- }
- CMD:caixa(playerid)
- {
- new objectid, Float:Pos[4];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetPlayerFacingAngle(playerid, Pos[3]);
- objectid = CreateDynamicObject(2226, Pos[0], Pos[1], Pos[2], 0.0, 0.0, Pos[3]);
- SoundBoxArea = CreateDynamicCircle(Pos[0], Pos[1], 10.0);
- AttachDynamicAreaToObject(SoundBoxArea, objectid);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement