Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
- #include <a_samp>
- #include <sscanf2> //http://forum.sa-mp.com/showthread.php?t=120356
- #include <zcmd> //http://forum.sa-mp.com/showthread.php?t=91354
- //variable global para activar el canal
- new bool:ActivarCanalGlobal;
- //variable global para activar la visualizacion del canal por jugador
- new bool:ActivarCanalPlayer[MAX_PLAYERS];
- COMMAND:duda(playerid, params[]){
- new data[128],nombre[MAX_PLAYER_NAME+1], rango[50];
- //obtiene el nombre del jugador con la id correspondiente.
- GetPlayerName(playerid, nombre, sizeof(nombre));
- //verifica si no escribiste ningun texto con el comando y le dara el mensaje.
- if(sscanf(params, "s[128]", params[0])) return SendClientMessage(playerid, -1, "Escribe: /duda (texto)");
- //verifica si el canal esta desactivado y el jugador no es administrador y le dara el mensaje.
- //CAMBIAR VariableADMIN por la variable del administador de tu sistema.
- if(ActivarCanalGlobal==false && !VariableADMIN) return SendClientMessage(playerid, -1, "el canal esta desactivado y no eres admministrador!.");
- switch(VariableADMIN){ //CAMBIAR VariableADMIN por la variable del administador de tu sistema.
- case 1: rango = "nombre del rango 1"; //CAMBIAR por el nombre del rango de tu sistema.
- case 2: rango = "nombre del rango 2"; //ETC...
- case 3: rango = "nombre del rango 3"; //ETC...
- case 4: rango = "nombre del rango 4"; //ETC...
- case 5: rango = "nombre del rango 5"; //ETC...
- case 6: rango = "nombre del rango 6";//ETC...
- //ETC...
- }
- //CAMBIAR VariableADMIN por la variable del administador de tu sistema.
- if(VariableADMIN){ //es administrador
- format(data, sizeof(data), "[RANGO ADMIN:%s] [NOMBRE:%s] [TEXTO:%s]", rango, nombre, params[0]);
- MensajesCanal(data, -1);
- }else{ //es jugador normal
- format(data, sizeof(data), "[NIVEL:%d] [NOMBRE:%s] [ID:%d] [TEXTO:%s]", GetPlayerScore(playerid), nombre, playerid, params[0]);
- MensajesCanal(data, -1);
- }
- return true;
- }
- COMMAND:canalplayer(playerid, params[]){
- if(!ActivarCanalPlayer[playerid]){ //canal desactivado, no es visualizado
- ActivarCanalPlayer[playerid]=true; //activa el canal
- }else{ //canal activado, es visualizado
- ActivarCanalPlayer[playerid]=false; //desactiva el canal
- }
- return true;
- }
- COMMAND:canalglobal(playerid, params[]){
- //CAMBIAR VariableADMIN por la variable del administador de tu sistema.
- if(VariableADMIN){ //es administrador
- if(ActivarCanalGlobal){ //canal desactivado
- ActivarCanalGlobal=true; //activa el canal
- for(new player, user = GetMaxPlayers(); player != user; player++){
- if(!IsPlayerConnected(player)) continue;
- if(player==playerid) continue;
- ActivarCanalPlayer[player]=true; //le activa el canal a todos los jugadores para ser visualizado
- }
- }else{ //canal activado
- ActivarCanalGlobal=false; //desactiva el canal
- for(new player, user = GetMaxPlayers(); player != user; player++){
- if(!IsPlayerConnected(player)) continue;
- if(player==playerid) continue;
- ActivarCanalPlayer[player]=false; //le desactiva el canal a todos los jugadores para no ser visualizado
- }
- }
- }else{ //es jugador normal
- SendClientMessage(playerid, -1, "usted no es administrador!.");
- }
- return true;
- }
- stock MensajesCanal(const texto[], color) {
- if(ActivarCanalGlobal==false) return false; //verifica que el canal este en false (desactivado) asi dejara la funcion nula.
- for(new player, user = GetMaxPlayers(); player != user; player++){ //verifica todos los jugadores que se encuentran comectados.
- if(!IsPlayerConnected(player)) continue; //verifica si el jugador esta desconectado continuara co nel siguiente.
- if(ActivarCanalPlayer[player]==true){ //verifica si el player tiene el canal activado
- SendClientMessage(player, color, texto); //manda el mensaje correspondiente al todos los jugadores con el canal activado.
- }
- } return true;
- }
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FILTERSCRIPT sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
- * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this FILTERSCRIPT without my permission.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement