Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Arts Chatbox Kunterbunt, (c) by .Art.*/
- #define FILTERSCRIPT
- #include <a_samp>
- new Farbe[MAX_PLAYERS];
- #define Rot 0xAA3333AA
- #define Gruen 0x00CC33C0
- #define Blau 0x0000FFBA
- #define ChangeColor 1
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new string[256];
- new Float:spX, Float:spY, Float:spZ;
- GetPlayerPos(playerid, spX, spY, spZ);
- if(Farbe[playerid] == 1) {
- format(string, sizeof(string), "%s sagt: %s",ReadName(playerid),text);
- SendRadiusMessage(180.0, Blau, string, spX, spY, spZ);}
- else if(Farbe[playerid] == 2) {
- format(string, sizeof(string), "%s sagt: %s",ReadName(playerid),text);
- SendRadiusMessage(180.0, Gruen, string, spX, spY, spZ);}
- else if(Farbe[playerid] == 3) {
- format(string, sizeof(string), "%s sagt: %s",ReadName(playerid),text);
- SendRadiusMessage(180.0, Rot, string, spX, spY, spZ);}
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/ChangeColor", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, ChangeColor, DIALOG_STYLE_LIST, "Chatbox Kunterbunt", "Chatbox Blau\nChatbox Grün\nChatbox Rot", "Auswählen", "Abbrechen");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == ChangeColor)
- {
- if(response)
- {
- if(listitem == 0)
- {
- Farbe[playerid] = 1;
- SendClientMessage(playerid, Blau, "Du schreibst nun Blau :)");
- }
- if(listitem == 1)
- {
- Farbe[playerid] = 2;
- SendClientMessage(playerid, Gruen, "Du schreibst nun Grün :)");
- }
- if(listitem == 2)
- {
- Farbe[playerid] = 3;
- SendClientMessage(playerid, Rot, "Du schreibst nun Rot :)");
- }
- }
- return 1;
- }
- return 1;
- }
- stock SendRadiusMessage(Float:radius, color, string[], Float:x, Float:y, Float:z)
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && !IsPlayerNPC(i))
- {
- if(IsPlayerInRangeOfPoint(i, radius, x, y, z))
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 0;
- }
- stock ReadName(playerid)
- {
- new playername[24];
- GetPlayerName(playerid, playername, 24);
- return playername;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement