03.10.2016, 18:38
Quote:
dcmd_tocarmusica(playerid,params[]){ if(CallRemoteFunction("GetPlayerAdminLevel","i",pl ayerid) < 2) return SendClientMessage(playerid,COLOUR_ERRO,StringTable[8]); if(!strlen(params)) return SendClientMessage(playerid, COLOUR_ERRO,"USO: /tocarmusica <URL>"); if(strlen(params) < 5) return SendClientMessage(playerid,COLOUR_ERRO,"[ERRO]: URL de rбdio online muito curta!"); CallRemoteFunction("CMDMessageToAdmins","is",playe rid,"TOCARMUSICA"); static i; for(i = GetMaxPlayers() - 1; i > -1; --i) { if(IsPlayerConnected(i)) { if(IsPlayerSpawned(i)) { PlayAudioStreamForPlayer(i, params); } } } static pname[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(string, sizeof(string), "{00FF22}[INFO]: O administrador {FFFFFF}%s {00FF22}colocou uma musica para todos! Para desligar a musica:{FFFFFF}/PARARMUSICA", pname); SendClientMessageToAll(COLOUR_TELEPORTE, string); return 1; } |