Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // CRÉDITOS:
- //[iPs]Av4stizin e a [iPs]Team
- // IDEIA:
- // A Ideia veio do Ragnarok online,Eu estava a jogar lá e no mercado poderia digitar /algumcmd [frase] e ficaria o chatbubble lá encima
- // da cabeça do cara...
- // CONCLUSÃO:
- //Tive a ideia de criar o projeto pelo Ragnarok Brasil Online [RBO]
- // META:
- //Tem como meta criar uma frase acima da cabeça da pessoa. ^^
- // Includes
- #include <a_samp>
- // Pragmas
- #pragma tabsize 0
- //Cores
- #define Cor1 0xFF0000AA
- #define Cor2 0xFFFF00AA
- #define Cor3 0x0080FFAA
- #define Cor4 0xFF80C0AA
- #define Cor5 0xFF80FFAA
- #define Cor6 0xFFFFFFAA
- #define Cor7 0x808080AA
- #define Cor8 0x000000AA
- #define Cor9 0x804000AA
- #define Cor10 0x00FFFFAA
- //Defines
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" [FS] Texto Acima da Cabeça");
- print(" Por: [iPs]Av4stizin e [iPs]Team");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- new TextoColocado[MAX_PLAYERS];
- new TextoTirado[MAX_PLAYERS];
- new Texto[MAX_PLAYERS];
- main()
- {
- print("\n----------------------------------");
- print(" [FS] Texto Acima da Cabeça");
- print(" Por: [iPs]Av4stizin e [iPs]Team");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, Cor6, "[Av4stChat] Sistema de Texto acima da Cabeça feito por [iPs]Av4stizin e [iPs]Team");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, Cor6, "[Av4stChat] Sistema de Texto acima da Cabeça feito por [iPs]Av4stizin e [iPs]Team");
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public OnPlayerText(playerid, text[])
- {
- if(TextoTirado[playerid] == 1)
- {
- return 1;
- }
- if(TextoColocado[playerid] == 1)
- {
- SetPlayerChatBubble(playerid, Texto, 0xFF0000FF, 100.0, 10000);
- return 1;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new tmp[256];
- new cmd[256];
- new idx;
- new string[256];
- new nomefdp[MAX_PLAYER_NAME];
- cmd = strtok(cmdtext, idx);
- //-----------------------
- if (strcmp("/creditos", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, Cor6, "[ERRO] Não estás conectado!");
- return 1;
- }
- SendClientMessage(playerid, Cor1, "~. Créditos .~");
- SendClientMessage(playerid, Cor2, "- [iPs]Av4stizin");
- SendClientMessage(playerid, Cor2, "- [iPs]Team");
- return 1;
- }
- if (strcmp("/cmdsfs", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, Cor6, "[ERRO] Não estás conectado!");
- return 1;
- }
- SendClientMessage(playerid, Cor6, "~. Comandos Texto Acima da Cabeça .~");
- SendClientMessage(playerid, Cor1, "/addfrase /mudarfrase /tirarfrase /minhafrase /creditos");
- return 1;
- }
- if (strcmp("/tirarfrase", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, Cor6, "[ERRO] Não estás conectado!");
- return 1;
- }
- TextoTirado[playerid] = 1;
- SendClientMessage(playerid, Cor2, "Tiraste a frase que estava acima de seu char!");
- return 1;
- }
- if (strcmp("/mudarfrase", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, Cor6, "[ERRO] Não estás conectado!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, Cor6, "USE: /mudarfrase [Nova Frase]");
- return 1;
- }
- TextoColocado[playerid] = 1;
- GetPlayerName(playerid,nomefdp,sizeof(nomefdp));
- format(string, sizeof(string), "[Av4sChat] %s adicionou a frase: [%s]!",nomefdp,Texto);
- SendClientMessageToAll(Cor6,string);
- return 1;
- }
- if (strcmp("/addfrase", cmdtext, true, 10) == 0)
- {
- new k=0;
- if(!IsPlayerConnected(playerid))
- {
- SendClientMessage(playerid, Cor6, "[ERRO] Não estás conectado!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, Cor6, "USE: /addfrase [Frase]");
- return 1;
- }
- format(string, sizeof(string), "[Av4sChat] Frase Adicionada: [%s]!", Texto);
- SendClientMessage(k,Cor3,string);
- return 1;
- }
- if(strcmp("/minhafrase",cmdtext, true, 10) == 0)
- {
- new k=0;
- format(string, sizeof(string), "[Av4sChat] Sua frase é [%s]!", Texto);
- SendClientMessage(k,Cor3,string);
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment