Guest User

Untitled

a guest
Jan 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.28 KB | None | 0 0
  1. CMD:audioplace(playerid, params[])
  2. {
  3.     if(PlayerInfo[playerid][pAdmin] >= 4) {
  4.         new string[128], soundid, volume, seek, range;
  5.         if(sscanf(params, "dddd", soundid, volume, seek, range)) return  SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /audioplace [soundid] [volume] [seek] [range].");
  6.         new Float:aX, Float:aY, Float:aZ;
  7.         GetPlayerPos(playerid, aX, aY, aZ);
  8.         new audioid = SendAudioToRange(soundid,volume,seek,aX,aY,aZ,range);
  9.         if(range > 100) {
  10.             format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has placed audioid (%d) - Volume: %d - Range: %d - ID: %d",GetPlayerNameEx(playerid),soundid,volume,range, audioid);
  11.             ABroadCast(COLOR_YELLOW, string, 4);
  12.         }
  13.         else {
  14.             format(string,sizeof(string),"You have placed audioid (%d) - Volume: %d - Range: %d - ID: %d",soundid,volume,range, audioid);
  15.             SendClientMessageEx(playerid, COLOR_YELLOW, string);
  16.             format(string, sizeof(string),"Use /audiostop %d to stop playback", audioid);
  17.             SendClientMessageEx(playerid, COLOR_YELLOW, string);
  18.         }
  19.     }
  20.     else {
  21.         SendClientMessageEx(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
  22.         return 1;
  23.     }
  24.     return 1;
  25. }
Add Comment
Please, Sign In to add comment