Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:audioplace(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 4) {
- new string[128], soundid, volume, seek, range;
- if(sscanf(params, "dddd", soundid, volume, seek, range)) return SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /audioplace [soundid] [volume] [seek] [range].");
- new Float:aX, Float:aY, Float:aZ;
- GetPlayerPos(playerid, aX, aY, aZ);
- new audioid = SendAudioToRange(soundid,volume,seek,aX,aY,aZ,range);
- if(range > 100) {
- format(string,sizeof(string),"{AA3333}AdmWarning{FFFF00}: %s has placed audioid (%d) - Volume: %d - Range: %d - ID: %d",GetPlayerNameEx(playerid),soundid,volume,range, audioid);
- ABroadCast(COLOR_YELLOW, string, 4);
- }
- else {
- format(string,sizeof(string),"You have placed audioid (%d) - Volume: %d - Range: %d - ID: %d",soundid,volume,range, audioid);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string),"Use /audiostop %d to stop playback", audioid);
- SendClientMessageEx(playerid, COLOR_YELLOW, string);
- }
- }
- else {
- SendClientMessageEx(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
- return 1;
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment