Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Créditos: dimmy_scarface/ForT - NUNCA RETIRE OS CREDITOS--
- Ultima vez compilado em: 26/11/2012
- http://forum.sa-mp.com
- */
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <DOF2>
- #if defined MAX_PLAYERS
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (100)
- #endif
- #define Admin1 "dimmy_scarface"
- #define Admin2 "MaluKo_Free"
- #define Admin3 "[WrS]JadsoN_"
- #define ChatInicio 2//Estilo do chat ao iniciar o FilterScript
- #define DIALOG_CHAT 9797
- //------------------------------------------------------------------------------
- new MaiorID = 1;
- //------------------------------------------------------------------------------
- new SomCHAT = 1;
- new TipoCHAT;
- new Text:TextOutros[8];
- new Text:TextLinhas[10];
- new strlinhas[10][128];
- new NicksBanidos[MAX_PLAYERS][MAX_PLAYER_NAME];
- enum ct{
- VendoCHAT,
- OnCHAT,
- EntrandoChat,
- AdmCHAT,
- ChatDesativado,
- Boox,
- Linhas,
- Banido,};
- new ChatInfo[MAX_PLAYERS][ct];
- public OnFilterScriptInit()
- {
- for(new oi = 0; oi < MAX_PLAYERS;oi++)NicksBanidos[oi] = "Ninguem";
- CarregarBanidos();
- SomCHAT = 1;
- print(#|---------[ CHAT v1.0 - ON ]---------|);
- print(#|---------[ by dimmy_scarface ]---------|);
- //------------------------------------------------------------------------------
- CriarCHAT(ChatInicio);
- return 1;
- }
- ShowChat(playerid)
- {
- if(ChatInfo[playerid][Boox] == 1){
- TextDrawShowForPlayer(playerid,TextOutros[0]);TextDrawShowForPlayer(playerid,TextOutros[7]);
- TextDrawShowForPlayer(playerid,TextOutros[1]);TextDrawShowForPlayer(playerid,TextOutros[2]);
- TextDrawShowForPlayer(playerid,TextOutros[3]);TextDrawShowForPlayer(playerid,TextOutros[4]);}
- if(ChatInfo[playerid][Boox] > 9)TextDrawShowForPlayer(playerid,TextLinhas[0]);
- if(ChatInfo[playerid][Linhas] > 8)TextDrawShowForPlayer(playerid,TextLinhas[1]);
- if(ChatInfo[playerid][Linhas] > 7)TextDrawShowForPlayer(playerid,TextLinhas[2]);
- if(ChatInfo[playerid][Linhas] > 6)TextDrawShowForPlayer(playerid,TextLinhas[3]);
- if(ChatInfo[playerid][Linhas] > 5)TextDrawShowForPlayer(playerid,TextLinhas[4]);
- TextDrawShowForPlayer(playerid,TextLinhas[5]);TextDrawShowForPlayer(playerid,TextLinhas[6]);
- TextDrawShowForPlayer(playerid,TextLinhas[7]);TextDrawShowForPlayer(playerid,TextLinhas[8]);
- TextDrawShowForPlayer(playerid,TextLinhas[9]);
- return true;
- }
- HideChat(playerid)
- {
- TextDrawHideForPlayer(playerid,TextOutros[ 0 ]);TextDrawHideForPlayer(playerid,TextOutros[ 7 ]);
- TextDrawHideForPlayer(playerid,TextOutros[ 1 ]);TextDrawHideForPlayer(playerid,TextOutros[ 2 ]);
- TextDrawHideForPlayer(playerid,TextOutros[ 3 ]);TextDrawHideForPlayer(playerid,TextOutros[ 4 ]);
- TextDrawHideForPlayer(playerid,TextLinhas[ 0 ]);TextDrawHideForPlayer(playerid,TextLinhas[ 1 ]);
- TextDrawHideForPlayer(playerid,TextLinhas[ 2 ]);TextDrawHideForPlayer(playerid,TextLinhas[ 3 ]);
- TextDrawHideForPlayer(playerid,TextLinhas[ 4 ]);TextDrawHideForPlayer(playerid,TextLinhas[ 5 ]);
- TextDrawHideForPlayer(playerid,TextLinhas[ 6 ]);TextDrawHideForPlayer(playerid,TextLinhas[ 7 ]);
- TextDrawHideForPlayer(playerid,TextLinhas[ 8 ]);TextDrawHideForPlayer(playerid,TextLinhas[ 9 ]);
- return true;
- }
- public OnFilterScriptExit()
- {
- SalvarBanidos();
- print(#|---------[ CHAT v1.0 - OFF ]---------|);
- print(#|---------[ by dimmy_scarface ]---------|);
- //------------------------------------------------------------------------------
- TextDrawDestroy(TextOutros[0]);TextDrawDestroy(TextOutros[7]);
- TextDrawDestroy(TextOutros[2]);TextDrawDestroy(TextOutros[3]);
- TextDrawDestroy(TextOutros[4]);TextDrawDestroy(TextLinhas[0]);
- TextDrawDestroy(TextLinhas[1]);TextDrawDestroy(TextLinhas[2]);
- TextDrawDestroy(TextLinhas[3]);TextDrawDestroy(TextLinhas[4]);
- TextDrawDestroy(TextLinhas[5]);TextDrawDestroy(TextLinhas[6]);
- TextDrawDestroy(TextLinhas[7]);TextDrawDestroy(TextLinhas[8]);
- TextDrawDestroy(TextLinhas[9]);TextDrawDestroy(TextOutros[1]);
- TextDrawDestroy(TextOutros[5]);TextDrawDestroy(TextOutros[6]);
- //------------------------------------------------------------------------------
- print(#\n\n|----[ TextDraw's destruidas com sucesso ]----|\n\n);
- DOF2_Exit();
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- ChatInfo[playerid][Banido] = 0;
- ChatInfo[playerid][VendoCHAT] = 0;ChatInfo[playerid][OnCHAT] = 0;
- ChatInfo[playerid][AdmCHAT] = 0;ChatInfo[playerid][Boox] = 1;
- ChatInfo[playerid][Linhas] = 10;ChatInfo[playerid][EntrandoChat] = 0;
- if(playerid+1 > MaiorID)MaiorID = playerid+1;ChatInfo[playerid][ChatDesativado] = 0;
- //------------------------------------------------------------------------------
- if(strcmp(getnome(playerid),Admin1,true) == 0 || strcmp(getnome(playerid),Admin2,true) == 0 ||
- strcmp(getnome(playerid),Admin3,true) == 0){
- ChatInfo[playerid][AdmCHAT] = 5;
- SendClientMessage(playerid, -1, #Você é administrador do CHAT.);}
- for(new oi = 0; oi < MAX_PLAYERS; oi++){
- if(strcmp(NicksBanidos[oi],getnome(playerid),true)==0){
- ChatInfo[playerid][Banido] = 1;
- SendClientMessage(playerid, 0xFF0000FF, #Você está banido do chat.);}
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(MaiorID == playerid+1)CheckMaiorID(playerid);
- if(ChatInfo[playerid][OnCHAT] == 1){
- new strin[71];
- if(ChatInfo[playerid][AdmCHAT] > 0)format(strin, sizeof strin, "~r~(ADM) %s saiu do chat.", getnome(playerid));
- else format(strin, sizeof strin, "~r~%s saiu do chat.", getnome(playerid));
- AtualizarLinhas();strlinhas[9] = strin;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- for(new i=0;i<MaiorID;i++)if(IsPlayerConnected(i)&&ChatInfo[i][OnCHAT]==1)PlayerPlaySound(i,6400,0.0,0.0,0.0);}
- return 1;
- }
- stock CheckMaiorID(playerid)
- {
- new mrid = 1;
- for(new id=0;id<MAX_PLAYERS;id++){if(IsPlayerConnected(id)&&id!=playerid){mrid=id+1;}}
- MaiorID = mrid;
- return true;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == KEY_YES && ChatInfo[playerid][OnCHAT] == 1 && ChatInfo[playerid][VendoCHAT] == 1){
- ShowPlayerDialog(playerid,DIALOG_CHAT,DIALOG_STYLE_INPUT,"Escreva no Xat",
- ". .",
- "Enviar","cancelar");}
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_CHAT){
- if(gettime()<ChatInfo[playerid][ChatDesativado])return SendClientMessage(playerid,0xFFFFFF,"Seu chat foi desativado temporariamente.");
- if(!response)return true;
- if(!strlen(inputtext))return true;
- for(new lin=0;lin<strlen(inputtext);lin++){
- if(inputtext[lin]=='~')inputtext[lin]='#';else if(inputtext[lin]=='á')inputtext[lin]='a';
- else if(inputtext[lin]=='â')inputtext[lin]='™';else if(inputtext[lin]=='ã')inputtext[lin]='™';
- else if(inputtext[lin]=='Ã')inputtext[lin]='A';else if(inputtext[lin]=='Á')inputtext[lin]='A';
- else if(inputtext[lin]=='É')inputtext[lin]='E';else if(inputtext[lin]=='Ê')inputtext[lin]='E';
- else if(inputtext[lin]=='Ú')inputtext[lin]='U';else if(inputtext[lin]=='Ù')inputtext[lin]='U';
- else if(inputtext[lin]=='é')inputtext[lin]='e';else if(inputtext[lin]=='ê')inputtext[lin]='e';
- else if(inputtext[lin]=='è')inputtext[lin]='e';else if(inputtext[lin]=='í')inputtext[lin]='i';
- else if(inputtext[lin]=='ì')inputtext[lin]='i';else if(inputtext[lin]=='î')inputtext[lin]='i';
- else if(inputtext[lin]=='ó')inputtext[lin]='¦';else if(inputtext[lin]=='ô')inputtext[lin]='o';
- else if(inputtext[lin]=='õ')inputtext[lin]='o';else if(inputtext[lin]=='ò')inputtext[lin]='o';
- else if(inputtext[lin]=='ú')inputtext[lin]='ª';else if(inputtext[lin]=='ù')inputtext[lin]='©';
- else if(inputtext[lin]=='û')inputtext[lin]='«';else if(inputtext[lin]=='º')inputtext[lin]='|';
- else if(inputtext[lin]=='ª')inputtext[lin]='|';else if(inputtext[lin]=='à')inputtext[lin]='a';
- else if(inputtext[lin]=='ñ')inputtext[lin]='n';else if(inputtext[lin]=='ý')inputtext[lin]='y';
- else if(inputtext[lin]=='ç')inputtext[lin]='œ';else if(inputtext[lin]=='^')inputtext[lin]='<';}
- new
- strimp[115], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof name);
- format(strimp, sizeof strimp, "~b~~h~~h~%s: ~w~%s", name,inputtext);
- //------------------------------------------------------------------------------
- strimp [ strlen ( strimp ) ] = 'Ä';//<= evitando um BUG tenso...
- //------------------------------------------------------------------------------
- AtualizarLinhas();strlinhas[9] = strimp;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- }
- return 1;
- }
- stock AtualizarLinhas ( )
- {
- strlinhas [ 0 ] = strlinhas [ 1 ];strlinhas [ 1 ] = strlinhas [ 2 ];strlinhas [ 2 ] = strlinhas [ 3 ];
- strlinhas [ 3 ] = strlinhas [ 4 ];strlinhas [ 4 ] = strlinhas [ 5 ];strlinhas [ 5 ] = strlinhas [ 6 ];
- strlinhas [ 6 ] = strlinhas [ 7 ];strlinhas [ 7 ] = strlinhas [ 8 ];strlinhas [ 8 ] = strlinhas [ 9 ];
- //------------------------------------------------------------------------------
- TextDrawSetString ( TextLinhas [ 0 ] , strlinhas [ 0 ] ) ;
- TextDrawSetString ( TextLinhas [ 1 ] , strlinhas [ 1 ] ) ;
- TextDrawSetString ( TextLinhas [ 2 ] , strlinhas [ 2 ] ) ;
- TextDrawSetString ( TextLinhas [ 3 ] , strlinhas [ 3 ] ) ;
- TextDrawSetString ( TextLinhas [ 4 ] , strlinhas [ 4 ] ) ;
- TextDrawSetString ( TextLinhas [ 5 ] , strlinhas [ 5 ] ) ;
- TextDrawSetString ( TextLinhas [ 6 ] , strlinhas [ 6 ] ) ;
- TextDrawSetString ( TextLinhas [ 7 ] , strlinhas [ 7 ] ) ;
- TextDrawSetString ( TextLinhas [ 8 ] , strlinhas [ 8 ] ) ;
- //------------------------------------------------------------------------------
- for(new i = 0; i < MaiorID ; i++ )
- {
- if( IsPlayerConnected ( i ) && ChatInfo [ i ] [ OnCHAT ] == 1 )
- {
- if ( SomCHAT == 1 ) PlayerPlaySound ( i , 4601 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 2 ) PlayerPlaySound ( i , 1150 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 3 ) PlayerPlaySound ( i , 1100 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 4 ) PlayerPlaySound ( i , 1135 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 5 ) PlayerPlaySound ( i , 1190 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 6 ) PlayerPlaySound ( i , 1084 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 7 ) PlayerPlaySound ( i , 1085 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 8 ) PlayerPlaySound ( i , 1095 , 0.0 , 0.0 , 0.0 ) ;
- else if ( SomCHAT == 9 ) PlayerPlaySound ( i , 6401 , 0.0 , 0.0 , 0.0 ) ;
- }
- }
- return 1;
- }
- stock getnome( playerid )
- {
- new nome [ MAX_PLAYER_NAME ] ;
- GetPlayerName ( playerid , nome , sizeof nome ) ;
- return nome ;
- }
- stock CriarCHAT(tp)
- {
- TipoCHAT = tp;
- if(tp == 1){
- TextOutros[0] = TextDrawCreate(333.000000, 131.000000, "_" );
- TextDrawBackgroundColor(TextOutros[0],255);
- TextDrawFont(TextOutros[0],1);
- TextDrawLetterSize(TextOutros[0],0.500000,25.200000);
- TextDrawColor(TextOutros[0],-1);
- TextDrawSetOutline(TextOutros[0],0);
- TextDrawSetProportional(TextOutros[0],1);
- TextDrawSetShadow(TextOutros[0],1);
- TextDrawUseBox(TextOutros[0],1);
- TextDrawBoxColor(TextOutros[0],60);
- TextDrawTextSize(TextOutros[0],638.000000, 272.000000);
- TextOutros[7] = TextDrawCreate(430.000000, 137.000000, "Chat v1.0");
- TextDrawBackgroundColor(TextOutros[7], -16777196);
- TextDrawFont(TextOutros[7], 2);
- TextDrawLetterSize(TextOutros[7], 0.459998, 1.400004);
- TextDrawColor(TextOutros[7], -16776961);
- TextDrawSetOutline(TextOutros[7], 1);
- TextDrawSetProportional(TextOutros[7], 1);
- TextLinhas[0] = TextDrawCreate(342.000000, 182.000000, " ");
- TextDrawBackgroundColor(TextLinhas[0], 30);
- TextDrawFont(TextLinhas[0], 1);
- TextDrawLetterSize(TextLinhas[0], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[0], -1);
- TextDrawSetOutline(TextLinhas[0], 0);
- TextDrawSetProportional(TextLinhas[0], 1);
- TextDrawSetShadow(TextLinhas[0], 1);
- TextLinhas[1] = TextDrawCreate(342.000000, 200.000000, " ");
- TextDrawBackgroundColor(TextLinhas[1], 30);
- TextDrawFont(TextLinhas[1], 1);
- TextDrawLetterSize(TextLinhas[1], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[1], -1);
- TextDrawSetOutline(TextLinhas[1], 0);
- TextDrawSetProportional(TextLinhas[1], 1);
- TextDrawSetShadow(TextLinhas[1], 1);
- TextLinhas[2] = TextDrawCreate(342.000000, 217.000000, " ");
- TextDrawBackgroundColor(TextLinhas[2], 30);
- TextDrawFont(TextLinhas[2], 1);
- TextDrawLetterSize(TextLinhas[2], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[2], -1);
- TextDrawSetOutline(TextLinhas[2], 0);
- TextDrawSetProportional(TextLinhas[2], 1);
- TextDrawSetShadow(TextLinhas[2], 1);
- TextLinhas[3] = TextDrawCreate(342.000000, 234.000000, " ");
- TextDrawBackgroundColor(TextLinhas[3], 30);
- TextDrawFont(TextLinhas[3], 1);
- TextDrawLetterSize(TextLinhas[3], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[3], -1);
- TextDrawSetOutline(TextLinhas[3], 0);
- TextDrawSetProportional(TextLinhas[3], 1);
- TextDrawSetShadow(TextLinhas[3], 1);
- TextLinhas[4] = TextDrawCreate(342.000000, 251.000000, " ");
- TextDrawBackgroundColor(TextLinhas[4], 30);
- TextDrawFont(TextLinhas[4], 1);
- TextDrawLetterSize(TextLinhas[4], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[4], -1);
- TextDrawSetOutline(TextLinhas[4], 0);
- TextDrawSetProportional(TextLinhas[4], 1);
- TextDrawSetShadow(TextLinhas[4], 1);
- TextLinhas[5] = TextDrawCreate(342.000000, 268.000000, " ");
- TextDrawBackgroundColor(TextLinhas[5], 30);
- TextDrawFont(TextLinhas[5], 1);
- TextDrawLetterSize(TextLinhas[5], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[5], -1);
- TextDrawSetOutline(TextLinhas[5], 0);
- TextDrawSetProportional(TextLinhas[5], 1);
- TextDrawSetShadow(TextLinhas[5], 1);
- TextLinhas[6] = TextDrawCreate(342.000000, 285.000000, " ");
- TextDrawBackgroundColor(TextLinhas[6], 30);
- TextDrawFont(TextLinhas[6], 1);
- TextDrawLetterSize(TextLinhas[6], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[6], -1);
- TextDrawSetOutline(TextLinhas[6], 0);
- TextDrawSetProportional(TextLinhas[6], 1);
- TextDrawSetShadow(TextLinhas[6], 1);
- TextLinhas[7] = TextDrawCreate(342.000000, 301.000000, " ");
- TextDrawBackgroundColor(TextLinhas[7], 30);
- TextDrawFont(TextLinhas[7], 1);
- TextDrawLetterSize(TextLinhas[7], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[7], -1);
- TextDrawSetOutline(TextLinhas[7], 0);
- TextDrawSetProportional(TextLinhas[7], 1);
- TextDrawSetShadow(TextLinhas[7], 1);
- TextLinhas[8] = TextDrawCreate(342.000000, 317.000000, " ");
- TextDrawBackgroundColor(TextLinhas[8], 30);
- TextDrawFont(TextLinhas[8], 1);
- TextDrawLetterSize(TextLinhas[8], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[8], -1);
- TextDrawSetOutline(TextLinhas[8], 0);
- TextDrawSetProportional(TextLinhas[8], 1);
- TextDrawSetShadow(TextLinhas[8], 1);
- TextLinhas[9] = TextDrawCreate(342.000000, 333.000000, " ");
- TextDrawBackgroundColor(TextLinhas[9], 30);
- TextDrawFont(TextLinhas[9], 1);
- TextDrawLetterSize(TextLinhas[9], 0.259999, 1.000000);
- TextDrawColor(TextLinhas[9], -1);
- TextDrawSetOutline(TextLinhas[9], 0);
- TextDrawSetProportional(TextLinhas[9], 1);
- TextDrawSetShadow(TextLinhas[9], 1);
- TextOutros[1] = TextDrawCreate(421.000000, 150.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[1], 255);
- TextDrawFont(TextOutros[1], 4);
- TextDrawLetterSize(TextOutros[1], 0.500000, 1.000000);
- TextDrawColor(TextOutros[1], -1);
- TextDrawSetOutline(TextOutros[1], 0);
- TextDrawSetProportional(TextOutros[1], 1);
- TextDrawSetShadow(TextOutros[1], 1);
- TextDrawUseBox(TextOutros[1], 1);
- TextDrawBoxColor(TextOutros[1], 255);
- TextDrawTextSize(TextOutros[1], 110.000000, 1.000000);
- TextOutros[2] = TextDrawCreate(329.000000, 127.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[2], 255);
- TextDrawFont(TextOutros[2], 4);
- TextDrawLetterSize(TextOutros[2], 0.500000, 1.000000);
- TextDrawColor(TextOutros[2], -1);
- TextDrawSetOutline(TextOutros[2], 0);
- TextDrawSetProportional(TextOutros[2], 1);
- TextDrawSetShadow(TextOutros[2], 1);
- TextDrawUseBox(TextOutros[2], 1);
- TextDrawBoxColor(TextOutros[2], 255);
- TextDrawTextSize(TextOutros[2], 2.000000, 235.000000);
- TextOutros[3] = TextDrawCreate(331.000000, 127.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[3], 255);
- TextDrawFont(TextOutros[3], 4);
- TextDrawLetterSize(TextOutros[3], 0.500000, 1.000000);
- TextDrawColor(TextOutros[3], -1);
- TextDrawSetOutline(TextOutros[3], 0);
- TextDrawSetProportional(TextOutros[3], 1);
- TextDrawSetShadow(TextOutros[3], 1);
- TextDrawUseBox(TextOutros[3], 1);
- TextDrawBoxColor(TextOutros[3], 255);
- TextDrawTextSize(TextOutros[3], 338.000000, 2.000000);
- TextOutros[4] = TextDrawCreate(331.000000, 360.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[4], 255);
- TextDrawFont(TextOutros[4], 4);
- TextDrawLetterSize(TextOutros[4], 0.500000, 1.000000);
- TextDrawColor(TextOutros[4], -1);
- TextDrawSetOutline(TextOutros[4], 0);
- TextDrawSetProportional(TextOutros[4], 1);
- TextDrawSetShadow(TextOutros[4], 1);
- TextDrawUseBox(TextOutros[4], 1);
- TextDrawBoxColor(TextOutros[4], 255);
- TextDrawTextSize(TextOutros[4], 322.000000, 2.000000);
- TextOutros[5] = TextDrawCreate(421.000000, 241.000000, "Entrando...");
- TextDrawBackgroundColor(TextOutros[5], 50);
- TextDrawFont(TextOutros[5], 2);
- TextDrawLetterSize(TextOutros[5], 0.519999, 1.399999);
- TextDrawColor(TextOutros[5], -16776961);
- TextDrawSetOutline(TextOutros[5], 1);
- TextDrawSetProportional(TextOutros[5], 1);}
- else if(tp == 2){
- TextOutros[0] = TextDrawCreate(672.000000, 289.000000, "_");
- TextDrawBackgroundColor(TextOutros[0], 10);
- TextDrawFont(TextOutros[0], 1);
- TextDrawLetterSize(TextOutros[0], 0.500000, 14.799999);
- TextDrawColor(TextOutros[0], -1);
- TextDrawSetOutline(TextOutros[0], 0);
- TextDrawSetProportional(TextOutros[0], 1);
- TextDrawSetShadow(TextOutros[0], 1);
- TextDrawUseBox(TextOutros[0], 1);
- TextDrawBoxColor(TextOutros[0], 80);
- TextDrawTextSize(TextOutros[0], 167.000000, -1.000000);
- TextOutros[7] = TextDrawCreate(169.000000, 286.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[7], 255);
- TextDrawFont(TextOutros[7], 4);
- TextDrawLetterSize(TextOutros[7], 0.500000, 1.000000);
- TextDrawColor(TextOutros[7], -1);
- TextDrawSetOutline(TextOutros[7], 0);
- TextDrawSetProportional(TextOutros[7], 1);
- TextDrawSetShadow(TextOutros[7], 1);
- TextDrawUseBox(TextOutros[7], 1);
- TextDrawBoxColor(TextOutros[7], 255);
- TextDrawTextSize(TextOutros[7], 481.000000, 2.000000);
- TextLinhas[0] = TextDrawCreate(178.000000, 291.000000, " ");
- TextDrawBackgroundColor(TextLinhas[0], 15);
- TextDrawFont(TextLinhas[0], 1);
- TextDrawLetterSize(TextLinhas[0], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[0], -1);
- TextDrawSetOutline(TextLinhas[0], 0);
- TextDrawSetProportional(TextLinhas[0], 1);
- TextDrawSetShadow(TextLinhas[0], 1);
- TextLinhas[1] = TextDrawCreate(178.000000, 304.000000, " ");
- TextDrawBackgroundColor(TextLinhas[1], 20);
- TextDrawFont(TextLinhas[1], 1);
- TextDrawLetterSize(TextLinhas[1], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[1], -1);
- TextDrawSetOutline(TextLinhas[1], 0);
- TextDrawSetProportional(TextLinhas[1], 1);
- TextDrawSetShadow(TextLinhas[1], 1);
- TextLinhas[2] = TextDrawCreate(178.000000, 317.000000, " ");
- TextDrawBackgroundColor(TextLinhas[2], 20);
- TextDrawFont(TextLinhas[2], 1);
- TextDrawLetterSize(TextLinhas[2], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[2], -1);
- TextDrawSetOutline(TextLinhas[2], 0);
- TextDrawSetProportional(TextLinhas[2], 1);
- TextDrawSetShadow(TextLinhas[2], 1);
- TextLinhas[3] = TextDrawCreate(178.000000, 330.000000, " ");
- TextDrawBackgroundColor(TextLinhas[3], 20);
- TextDrawFont(TextLinhas[3], 1);
- TextDrawLetterSize(TextLinhas[3], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[3], -1);
- TextDrawSetOutline(TextLinhas[3], 0);
- TextDrawSetProportional(TextLinhas[3], 1);
- TextDrawSetShadow(TextLinhas[3], 1);
- TextLinhas[4] = TextDrawCreate(178.000000, 343.000000, " ");
- TextDrawBackgroundColor(TextLinhas[4], 20);
- TextDrawFont(TextLinhas[4], 1);
- TextDrawLetterSize(TextLinhas[4], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[4], -1);
- TextDrawSetOutline(TextLinhas[4], 0);
- TextDrawSetProportional(TextLinhas[4], 1);
- TextDrawSetShadow(TextLinhas[4], 1);
- TextLinhas[5] = TextDrawCreate(178.000000, 356.000000, " ");
- TextDrawBackgroundColor(TextLinhas[5], 20);
- TextDrawFont(TextLinhas[5], 1);
- TextDrawLetterSize(TextLinhas[5], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[5], -1);
- TextDrawSetOutline(TextLinhas[5], 0);
- TextDrawSetProportional(TextLinhas[5], 1);
- TextDrawSetShadow(TextLinhas[5], 1);
- TextLinhas[6] = TextDrawCreate(178.000000, 369.000000, " ");
- TextDrawBackgroundColor(TextLinhas[6], 20);
- TextDrawFont(TextLinhas[6], 1);
- TextDrawLetterSize(TextLinhas[6], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[6], -1);
- TextDrawSetOutline(TextLinhas[6], 0);
- TextDrawSetProportional(TextLinhas[6], 1);
- TextDrawSetShadow(TextLinhas[6], 1);
- TextLinhas[7] = TextDrawCreate(178.000000, 382.000000, " ");
- TextDrawBackgroundColor(TextLinhas[7], 20);
- TextDrawFont(TextLinhas[7], 1);
- TextDrawLetterSize(TextLinhas[7], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[7], -1);
- TextDrawSetOutline(TextLinhas[7], 0);
- TextDrawSetProportional(TextLinhas[7], 1);
- TextDrawSetShadow(TextLinhas[7], 1);
- TextLinhas[8] = TextDrawCreate(178.000000, 395.000000, " ");
- TextDrawBackgroundColor(TextLinhas[8], 20);
- TextDrawFont(TextLinhas[8], 1);
- TextDrawLetterSize(TextLinhas[8], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[8], -1);
- TextDrawSetOutline(TextLinhas[8], 0);
- TextDrawSetProportional(TextLinhas[8], 1);
- TextDrawSetShadow(TextLinhas[8], 1);
- TextLinhas[9] = TextDrawCreate(178.000000, 408.000000, " ");
- TextDrawBackgroundColor(TextLinhas[9], 20);
- TextDrawFont(TextLinhas[9], 1);
- TextDrawLetterSize(TextLinhas[9], 0.280000, 1.100000);
- TextDrawColor(TextLinhas[9], -1);
- TextDrawSetOutline(TextLinhas[9], 0);
- TextDrawSetProportional(TextLinhas[9], 1);
- TextDrawSetShadow(TextLinhas[9], 1);
- TextOutros[1] = TextDrawCreate(170.000000, 424.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[1], 255);
- TextDrawFont(TextOutros[1], 4);
- TextDrawLetterSize(TextOutros[1], 0.500000, 1.000000);
- TextDrawColor(TextOutros[1], -1);
- TextDrawSetOutline(TextOutros[1], 0);
- TextDrawSetProportional(TextOutros[1], 1);
- TextDrawSetShadow(TextOutros[1], 1);
- TextDrawUseBox(TextOutros[1], 1);
- TextDrawBoxColor(TextOutros[1], 255);
- TextDrawTextSize(TextOutros[1], 481.000000, 2.000000);
- TextOutros[2] = TextDrawCreate(369.000000, 278.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[2], 255);
- TextDrawFont(TextOutros[2], 4);
- TextDrawLetterSize(TextOutros[2], 0.500000, 1.000000);
- TextDrawColor(TextOutros[2], -1);
- TextDrawSetOutline(TextOutros[2], 0);
- TextDrawSetProportional(TextOutros[2], 1);
- TextDrawSetShadow(TextOutros[2], 1);
- TextDrawUseBox(TextOutros[2], 1);
- TextDrawBoxColor(TextOutros[2], 255);
- TextDrawTextSize(TextOutros[2], 57.000000, 10.000000);
- TextOutros[3] = TextDrawCreate(381.000000, 278.000000, "chat");
- TextDrawBackgroundColor(TextOutros[3], -236);
- TextDrawFont(TextOutros[3], 1);
- TextDrawLetterSize(TextOutros[3], 0.500000, 1.000000);
- TextDrawColor(TextOutros[3], 255);
- TextDrawSetOutline(TextOutros[3], 1);
- TextDrawSetProportional(TextOutros[3], 1);
- TextOutros[4] = TextDrawCreate(169.000000, 288.000000, "ld_dual:health");
- TextDrawBackgroundColor(TextOutros[4], 255);
- TextDrawFont(TextOutros[4], 4);
- TextDrawLetterSize(TextOutros[4], 0.500000, 1.000000);
- TextDrawColor(TextOutros[4], -1);
- TextDrawSetOutline(TextOutros[4], 0);
- TextDrawSetProportional(TextOutros[4], 1);
- TextDrawSetShadow(TextOutros[4], 1);
- TextDrawUseBox(TextOutros[4], 1);
- TextDrawBoxColor(TextOutros[4], 255);
- TextDrawTextSize(TextOutros[4], 3.000000, 137.000000);
- TextOutros[5] = TextDrawCreate(338.000000, 350.000000, "Entrando...");
- TextDrawBackgroundColor(TextOutros[5], 50);
- TextDrawFont(TextOutros[5], 2);
- TextDrawLetterSize(TextOutros[5], 0.569999, 1.300000);
- TextDrawColor(TextOutros[5], -16776961);
- TextDrawSetOutline(TextOutros[5], 1);
- TextDrawSetProportional(TextOutros[5], 1);
- TextOutros[6] = TextDrawCreate(180.000000, 320.000000, "/mensagemchat");
- TextDrawBackgroundColor(TextOutros[6], -16777176);
- TextDrawFont(TextOutros[6], 1);
- TextDrawLetterSize(TextOutros[6], 0.770000, 4.599999);
- TextDrawColor(TextOutros[6], -16776961);
- TextDrawSetOutline(TextOutros[6], 1);
- TextDrawSetProportional(TextOutros[6], 1);}
- print(#\n\n|-----[ TextDraw's criadas com sucesso ]------|\n\n);
- return true;
- }
- forward DTD();public DTD()TextDrawHideForAll(TextOutros[6]);
- new stringe[128];
- forward LogandoChat(playerid);
- public LogandoChat(playerid)
- {
- TextDrawHideForPlayer(playerid,TextOutros[0]);TextDrawHideForPlayer(playerid,TextOutros[7]);
- TextDrawHideForPlayer(playerid,TextOutros[2]);TextDrawHideForPlayer(playerid,TextOutros[1]);
- TextDrawHideForPlayer(playerid,TextOutros[3]);TextDrawHideForPlayer(playerid,TextOutros[4]);
- TextDrawHideForPlayer(playerid,TextOutros[5]);
- if(ChatInfo[playerid][AdmCHAT] > 0)format(stringe, sizeof stringe, "~r~(ADM) %s entrou no chat.", getnome(playerid));
- else format(stringe, sizeof stringe, "~r~%s entrou no chat.", getnome(playerid));
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- ShowChat(playerid);ChatInfo[playerid][OnCHAT] = 1;ChatInfo[playerid][VendoCHAT] = 1;ChatInfo[playerid][EntrandoChat] = 0;
- for(new i = 0; i < MaiorID; i++)if(IsPlayerConnected(i)&&ChatInfo[i][OnCHAT]==1)PlayerPlaySound(i, 6400, 0.0, 0.0, 0.0);
- return true;
- }
- stock SalvarBanidos()
- {
- new ss[74];
- format(stringe,sizeof stringe,"BanidosChat.ini");
- if(!DOF2_FileExists(stringe))DOF2_CreateFile(stringe);
- for(new playerid=0;playerid<MAX_PLAYERS;playerid++){
- format(ss,sizeof ss,"player%d",playerid);
- DOF2_SetString(stringe, ss,NicksBanidos[playerid]);}
- return true;
- }
- stock CarregarBanidos()
- {
- new ss[74];
- format(stringe,sizeof stringe,"BanidosChat.ini");
- if(DOF2_FileExists(stringe)){
- for(new playerid=0;playerid<MAX_PLAYERS;playerid++){
- format(ss,sizeof ss,"player%d",playerid);
- strmid(NicksBanidos[playerid], DOF2_GetString(stringe, ss), 0, strlen(DOF2_GetString(stringe, ss)), 255);}
- }
- return true;
- }
- //----------- comandos -------------//
- CMD:ct(playerid, params[])
- {
- new chaty[111];
- if(sscanf(params, "s[111]", chaty))return SendClientMessage(playerid, -1, #=> /ct [chat]);
- if(ChatInfo[playerid][OnCHAT] == 1 && ChatInfo[playerid][VendoCHAT] == 1){
- if(gettime()<ChatInfo[playerid][ChatDesativado])return SendClientMessage(playerid,0xFFFFFF,"Seu chat foi desativado temporariamente.");
- for(new lin=0;lin<strlen(chaty);lin++){
- if(chaty[lin]=='~')chaty[lin]='#';else if(chaty[lin]=='á')chaty[lin]='a';
- else if(chaty[lin]=='â')chaty[lin]='a';else if(chaty[lin]=='ã')chaty[lin]='a';
- else if(chaty[lin]=='é')chaty[lin]='e';else if(chaty[lin]=='ê')chaty[lin]='e';
- else if(chaty[lin]=='è')chaty[lin]='e';else if(chaty[lin]=='í')chaty[lin]='i';
- else if(chaty[lin]=='ì')chaty[lin]='i';else if(chaty[lin]=='î')chaty[lin]='i';
- else if(chaty[lin]=='ó')chaty[lin]='¦';else if(chaty[lin]=='ô')chaty[lin]='o';
- else if(chaty[lin]=='õ')chaty[lin]='o';else if(chaty[lin]=='ò')chaty[lin]='o';
- else if(chaty[lin]=='ú')chaty[lin]='ª';else if(chaty[lin]=='ù')chaty[lin]='©';
- else if(chaty[lin]=='û')chaty[lin]='«';else if(chaty[lin]=='º')chaty[lin]='|';
- else if(chaty[lin]=='ª')chaty[lin]='|';
- else if(chaty[lin]=='ñ')chaty[lin]='n';else if(chaty[lin]=='ý')chaty[lin]='y';
- else if(chaty[lin]=='ç')chaty[lin]='c';else if(chaty[lin]=='^')chaty[lin]=':';}
- new
- strimp[115], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof name);
- format(strimp, sizeof strimp, "~b~~h~~h~%s: ~w~%s", name,chaty);
- //------------------------------------------------------------------------------
- strimp [ strlen ( strimp ) ] = 'Ä';//<= evitando um BUG tenso...
- //------------------------------------------------------------------------------
- AtualizarLinhas();strlinhas[9] = strimp;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);}
- else return SendClientMessage(playerid, 0xFFFFFF, #Você já está logado no chat ou não está vendo o mesmo);
- return true;
- }
- CMD:logarchat(playerid)
- {
- if(ChatInfo[playerid][Banido] == 1)return SendClientMessage(playerid, 0xFF0000, "Você não pode entrar no chat, pois está banido");
- if(ChatInfo[playerid][OnCHAT] == 0){
- if(ChatInfo[playerid][EntrandoChat] == 1)return SendClientMessage(playerid, -1, #Você já está entrando no chat..);
- SetTimerEx("LogandoChat", 8000, 0, "i", playerid);
- TextDrawShowForPlayer(playerid,TextOutros[0]);TextDrawShowForPlayer(playerid,TextOutros[7]);
- TextDrawShowForPlayer(playerid,TextOutros[2]);TextDrawShowForPlayer(playerid,TextOutros[1]);
- TextDrawShowForPlayer(playerid,TextOutros[3]);TextDrawShowForPlayer(playerid,TextOutros[4]);
- TextDrawShowForPlayer(playerid,TextOutros[5]);ChatInfo[playerid][EntrandoChat] = 1;}
- else return SendClientMessage(playerid, 0xFFFFFF, #Você já está logado no chat);
- return true;
- }
- CMD:sairchat(playerid)
- {
- if(ChatInfo[playerid][OnCHAT] == 1){
- if(ChatInfo[playerid][AdmCHAT] > 0)format(stringe, sizeof stringe, "~r~(ADM) %s saiu do chat.", getnome(playerid));
- else format(stringe, sizeof stringe, "~r~%s saiu do chat.", getnome(playerid));
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- HideChat(playerid);ChatInfo[playerid][OnCHAT] = 0;ChatInfo[playerid][VendoCHAT] = 0;
- PlayerPlaySound(playerid, 6400, 0.0, 0.0, 0.0);
- for(new i = 0; i < MaiorID; i++)if(IsPlayerConnected(i) && ChatInfo[i][OnCHAT] == 1)PlayerPlaySound(i, 6400, 0.0, 0.0, 0.0);}
- else return SendClientMessage(playerid, 0xFFFFFF, #Você não está logado no chat);
- return true;
- }
- CMD:daradmchat(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 1){
- new id, nivel;
- if(sscanf(params, "ud", id, nivel))return SendClientMessage(playerid, -1, #=> /daradmchat [id][nivel]);
- if(!IsPlayerConnected(id))return true;
- format(stringe, sizeof stringe, "O ADM %s te deu Admin nivel %d do CHAT.", getnome(playerid), nivel);
- SendClientMessage(id, -1, stringe);
- format(stringe, sizeof stringe, "Voce deu admin nivel %d do CHAT para %s", nivel,getnome(id));
- SendClientMessage(playerid, -1, stringe);ChatInfo[id][AdmCHAT] = nivel;}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:mensagemchat(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 1){
- new msg[64];
- if(sscanf(params, "s[64]", msg))return SendClientMessage(playerid, -1, #=> /mensagemchat [mensagem]);
- if(TipoCHAT == 1)return SendClientMessage(playerid, -1, #Apenas no chat 2);
- TextDrawSetString(TextOutros[6], msg);
- for(new id=0;id<MaiorID;id++)if(ChatInfo[id][VendoCHAT]==1&&ChatInfo[id][OnCHAT]==1)TextDrawShowForPlayer(id, TextOutros[6]);
- SetTimer("DTD", 3000, 0);}
- else return SendClientMessage(playerid, -1, #Você não é um admin.);
- return true;
- }
- CMD:kickchat(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 0){
- new id, motivo[64];
- if(sscanf(params, "us[64]", id, motivo))return SendClientMessage(playerid, -1, #=> /kickchat [id][motivo]);
- if(!IsPlayerConnected(id))return true;
- format(stringe, sizeof stringe, "O ADM %s kickou você do CHAT, motivo: %s", getnome(playerid), motivo);
- SendClientMessage(id, -1, stringe);
- format(stringe, sizeof stringe, "~g~~h~%s kickou %s, motivo: %s", getnome(playerid),getnome(id), motivo);
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- HideChat(id);ChatInfo[id][OnCHAT] = 0;ChatInfo[id][VendoCHAT] = 0;}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:desativarchat(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 1){
- new id, minu;
- if(sscanf(params, "ud", id, minu))return SendClientMessage(playerid, -1, #=> /desativarchat [id][minutos]);
- if(!IsPlayerConnected(id))return true;
- format(stringe, sizeof stringe, "O ADM %s desativou seu CHAT por %d minutos.", getnome(playerid), minu);
- SendClientMessage(id, -1, stringe);
- format(stringe, sizeof stringe, "~g~~h~%s desativou o chat de %s: %d min.", getnome(playerid),getnome(id), minu);
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- ChatInfo[id][ChatDesativado] = gettime()+minu*60;}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:chat(playerid, params[])
- {
- new onoff[10];
- if(sscanf(params, "s[10]",onoff))return SendClientMessage(playerid, -1, #=> /chat ON ou /chat OFF);
- if(strcmp(onoff, "ON", true) == 0){
- if(ChatInfo[playerid][VendoCHAT] == 1)return true;
- PlayerPlaySound(playerid, 6402, 0.0, 0.0, 0.0);
- ShowChat(playerid);ChatInfo[playerid][VendoCHAT] = 1;}
- else if(strcmp(onoff, "OFF", true) == 0){
- if(ChatInfo[playerid][VendoCHAT] == 0)return true;
- PlayerPlaySound(playerid, 6402, 0.0, 0.0, 0.0);
- HideChat(playerid);ChatInfo[playerid][VendoCHAT] = 0;}
- else return SendClientMessage(playerid, -1, #=> /chat ON ou /chat OFF);
- return true;
- }
- CMD:chatsom(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 0){
- if(ChatInfo[playerid][OnCHAT] == 0)return SendClientMessage(playerid, 0xFFFFFF, #Você não está logado no chat);
- new sound;
- if(sscanf(params, "d",sound))return SendClientMessage(playerid, -1, #/chatsom [1 - 9]);
- if(sound < 1 || sound > 9)return SendClientMessage(playerid, -1, #/chatsom [1 - 9]);
- SomCHAT = sound;
- format(stringe, sizeof stringe, "~y~(ADM) %s mudou o som do chat para %d", getnome(playerid), sound);
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:box(playerid, params[])
- {
- new onoff[10];
- if(sscanf(params, "s[10]",onoff))return SendClientMessage(playerid, -1, #=> /box ON ou /box OFF);
- if(strcmp(onoff, "ON", true) == 0){
- if(ChatInfo[playerid][Boox] == 0 && ChatInfo[playerid][VendoCHAT] == 1){
- ChatInfo[playerid][Boox] = 1;
- HideChat(playerid);ShowChat(playerid);}}
- else if(strcmp(onoff, "OFF", true) == 0){
- if(ChatInfo[playerid][VendoCHAT] == 1 && ChatInfo[playerid][Boox] == 1){
- ChatInfo[playerid][Boox] = 0;
- HideChat(playerid);ShowChat(playerid);}}
- else return SendClientMessage(playerid, -1, #=> /box ON ou /box OFF);
- return true;
- }
- CMD:linhaschat(playerid, params[])
- {
- new linha;
- if(sscanf(params, "d", linha))return SendClientMessage(playerid, -1, "=> /linhaschat [5 - 10]");
- if(linha < 5 || linha > 10)return SendClientMessage(playerid, -1, "=> /linhaschat [5 - 10]");
- if(ChatInfo[playerid][VendoCHAT] == 0)return true;
- ChatInfo[playerid][Linhas] = linha;HideChat(playerid);ShowChat(playerid);
- return true;
- }
- CMD:mudarchat(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 1){
- new tipo;
- if(sscanf(params, "d", tipo))return SendClientMessage(playerid, -1, "=> /mudarchat [1 - 2]");
- if(tipo < 1 || tipo > 2)return SendClientMessage(playerid, -1, "=> /mudarchat [1 - 2]");
- if(TipoCHAT == tipo)return SendClientMessage(playerid, -1, #Já está sendo usado este modelo);
- TextDrawDestroy(TextOutros[0]);TextDrawDestroy(TextOutros[7]);
- TextDrawDestroy(TextOutros[2]);TextDrawDestroy(TextOutros[3]);
- TextDrawDestroy(TextOutros[4]);TextDrawDestroy(TextLinhas[0]);
- TextDrawDestroy(TextLinhas[1]);TextDrawDestroy(TextLinhas[2]);
- TextDrawDestroy(TextLinhas[3]);TextDrawDestroy(TextLinhas[4]);
- TextDrawDestroy(TextLinhas[5]);TextDrawDestroy(TextLinhas[6]);
- TextDrawDestroy(TextLinhas[7]);TextDrawDestroy(TextLinhas[8]);
- TextDrawDestroy(TextLinhas[9]);TextDrawDestroy(TextOutros[1]);
- CriarCHAT(tipo);
- format(stringe, sizeof stringe, "~y~(ADM) %s mudou a posicao do chat.", getnome(playerid));
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);
- for(new i=0;i<MaiorID;i++)if(IsPlayerConnected(i)&&ChatInfo[i][OnCHAT]==1&&ChatInfo[playerid][VendoCHAT]==1)ShowChat(i);}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:lc(playerid)
- {
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 0){
- strlinhas[0] = " ";strlinhas[1] = " ";
- strlinhas[2] = " ";strlinhas[3] = " ";strlinhas[4] = " ";strlinhas[5] = " ";
- strlinhas[6] = " ";strlinhas[7] = " ";strlinhas[8] = " ";strlinhas[9] = " ";
- format(stringe, sizeof stringe, "~p~(ADM) %s resetou o chat.", getnome(playerid));
- AtualizarLinhas();strlinhas[9] = stringe;
- TextDrawSetString(TextLinhas[9], strlinhas[9]);}
- else return SendClientMessage(playerid, -1, #Seu nivel de admin do CHAT é muito baixo para fazer isto.);
- return true;
- }
- CMD:ajudachat(playerid)
- {
- new strajuda[1320];
- format(stringe,sizeof stringe,
- "*-------------------------------------------[ AJUDA CHAT ]-------------------------------------------*\n");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}LETRA Y ou /CT - {FFFFFF}escreve no chat");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/LOGARCHAT - {FFFFFF}loga no chat, para poder falar com outros players.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/SAIRCHAT - {FFFFFF}sai da conversa no chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/CHAT - {FFFFFF}esconde/mostra o chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/BOX - {FFFFFF}ativa/desativa o box do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/LINHASCHAT - {FFFFFF}muda a quantidade de linhas que você deseja ver.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/ONCHAT - {FFFFFF}usado para ver os players conectados ao chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{33FF00}/ADMINSCHAT - {FFFFFF}usado para ver os administradores do chat online.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/MUDARCHAT - {FFFFFF}muda a posição do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/KICKCHAT - {FFFFFF}kicka um player do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/CHATSOM - {FFFFFF}muda o som do chat ao escrever.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/LC - {FFFFFF}limpa as linhas do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/DESATIVARCHAT - {FFFFFF}desativa o chat de um player em um determinado tempo.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/MENSAGEMCHAT - {FFFFFF}manda uma mensagem grande no chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/DARADMCHAT - {FFFFFF}promove um player a administrador do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/BANCHAT - {FFFFFF}ban um jogador do chat.");strcat(strajuda,stringe);
- format(stringe,sizeof stringe,
- "\n{FF0000}[Admin]{33FF00}/DESBANCHAT - {FFFFFF}desban um jogador do chat.");strcat(strajuda,stringe);
- ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX,"Ajuda CHAT", strajuda, "SAIR", "");
- return true;
- }
- CMD:onchat(playerid){
- new nochat = 0;
- for(new pl = 0;pl<MaiorID;pl++){
- if(IsPlayerConnected(pl) && ChatInfo[pl][OnCHAT] == 1){
- format(stringe, sizeof stringe, "{FFFFFF}%s {33FF00}(ONLINE)", getnome(pl));
- SendClientMessage(playerid, -1, stringe);
- nochat = 1;}}
- if(nochat == 0)return SendClientMessage(playerid, -1, "Ninguem está online no chat");
- return true;
- }
- CMD:adminschat(playerid){
- new nochat = 0;
- for(new pl = 0;pl<MaiorID;pl++){
- if(IsPlayerConnected(pl) && ChatInfo[pl][AdmCHAT] > 0){
- format(stringe, sizeof stringe, "{FFFFFF}%s - {33FF00}nivel: %d", getnome(pl),ChatInfo[pl][AdmCHAT]);
- SendClientMessage(playerid, -1, stringe);
- nochat = 1;}}
- if(nochat == 0)return SendClientMessage(playerid, -1, "Nenhum admin do chat online");
- return true;
- }
- CMD:banchat(playerid, params[]){
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 0){
- new id, motivo[64];
- if(sscanf(params, "us[64]", id, motivo))return SendClientMessage(playerid, -1, "=> /banchat [id][motivo]");
- if(ChatInfo[id][Banido] == 1)return SendClientMessage(playerid, -1, "Este player já está banido do chat.");
- ChatInfo[id][Banido] = 1;
- HideChat(id);ChatInfo[id][OnCHAT] = 0;ChatInfo[id][VendoCHAT] = 0;
- format(stringe, sizeof stringe, "~p~(ADM) %s baniu %s: %s.", getnome(playerid), getnome(id), motivo);
- AtualizarLinhas();strlinhas[9] = stringe;TextDrawSetString(TextLinhas[9], strlinhas[9]);
- for(new i = 0;i < MAX_PLAYERS;i++){
- if(strcmp(NicksBanidos[i],"Ninguem",true)==0){
- NicksBanidos[i] = getnome(id);return true;}}}
- return true;
- }
- CMD:desbanchat(playerid, params[]){
- if(IsPlayerAdmin(playerid) || ChatInfo[playerid][AdmCHAT] > 0){
- new nickbanido[74], bani = 0;
- if(sscanf(params,"s[74]",nickbanido))return SendClientMessage(playerid, -1, "=> /desbanchat [Nick]");
- for(new nick = 0;nick<MAX_PLAYERS;nick++){
- if(strcmp(NicksBanidos[nick],nickbanido,true) == 0){
- for(new pl=0;pl<MaiorID;pl++){
- if(IsPlayerConnected(pl)&&strcmp(getnome(pl),nickbanido,true)==0){
- SendClientMessage(pl,-1,"Você foi desbanido do chat");ChatInfo[pl][Banido]=0;}}
- NicksBanidos[nick] = "Ninguem";bani = 1;
- format(stringe, sizeof stringe, "~p~(ADM) %s desbaniu %s.", getnome(playerid), nickbanido);
- AtualizarLinhas();strlinhas[9] = stringe;TextDrawSetString(TextLinhas[9], strlinhas[9]);
- SendClientMessage(playerid, -1, stringe);return true;}}
- if(bani == 0)return SendClientMessage(playerid, -1, "Este nick não está banido");}
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement