/color command
#1

Hi.
Can someone please make me a command?
if i type /color a menu whould come up showing the possbile colors,and allowing you to change your names current color.

Thankyou
Reply
#2

Here use this filterscript, it works like /green /red etc.

pawn Код:
/*  Coulour System is Created in 11.11.2012
     Thisi system is Created by Legena!
      I hope it will like to you!
       And i want that yours servers looking nice.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!WARRING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Dont remove credits or Filterscript wont work!!!!!!!!!
*/



//////////  INCLUDES  //////////////////////////////////////////////////////////

#include <a_samp>
#pragma tabsize 0

public OnFilterScriptInit()
{
        print("\n----------------------------------");
        print(" Colour System by Legena Loaded ");
        print("----------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}
//////////  COMMANDS  //////////////////////////////////////////////////////////
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(strcmp("/green", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x33AA33AA);
       SendClientMessage(playerid, 0x33AA33AA, "Your Name Has Changed To Green");
       return 1;
   }
   if(strcmp("/red", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xAA3333AA);
       SendClientMessage(playerid, 0xAA3333AA, "Your Name Has Changed To Red");
       return 1;
   }
   if(strcmp("/yellow", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xFFFF00AA);
       SendClientMessage(playerid, 0xFFFF00AA, "Your Name Has Change To Yellow");
       return 1;
   }
   if(strcmp("/blue", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x0000FFAA);
       SendClientMessage(playerid, 0x0000FFAA, "Your Name Has Change To Blue");
       return 1;
   }
   if(strcmp("/orange", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xFF9900AA);
       SendClientMessage(playerid, 0xFF9900AA, "Your Name Has Change To Orange");
       return 1;
   }
   if(strcmp("/gold", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xD4A017AA);
       SendClientMessage(playerid, 0xD4A017AA, "Your Name Has Change To Gold");
       return 1;
   }
   if(strcmp("/pink", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xFF00FFAA);
       SendClientMessage(playerid, 0xFF00FFAA, "Your Name Has Change To Pink");
       return 1;
   }
   if(strcmp("/aqua", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x00FFFFAA);
       SendClientMessage(playerid, 0x00FFFFAA, "Your Name Has Change To Aqua");
       return 1;
   }
   if(strcmp("/lime", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x00FF00AA);
       SendClientMessage(playerid, 0x00FF00AA, "Your Name Has Change To Lime");
       return 1;
   }
   if(strcmp("/black", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x00000000);
       SendClientMessage(playerid, 0x00000000, "Your Name Has Change To Black");
       return 1;
   }
   if(strcmp("/white", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0xFFFFFFFF);
       SendClientMessage(playerid, 0xFFFFFFFF, "Your Name Has Change To White");
       return 1;
   }
   if(strcmp("/grey", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x6c6c6cAA);
       SendClientMessage(playerid, 0x6c6c6cAA, "Your Name Has Change To Grey");
       return 1;
   }
   if(strcmp("/purple", cmdtext, true, 10) == 0)
   {
       SetPlayerColor(playerid, 0x800080AA);
       SendClientMessage(playerid, 0x800080AA, "Your Name Has Change To Purple");
       return 1;
   }

        if (strcmp("/colours", cmdtext, true, 10) == 0){
        SendClientMessage(playerid, 0xD51CC2C8, "Chat Colours");
        SendClientMessage(playerid, 0x33AA33AA, "//////// <--------- /green");
        SendClientMessage(playerid, 0xAA3333AA, "//////// <--------- /red");
        SendClientMessage(playerid, 0xFFFF00AA, "//////// <--------- /yellow");
        SendClientMessage(playerid, 0x0000FFAA, "//////// <--------- /blue");
        SendClientMessage(playerid, 0xFF9900AA, "//////// <--------- /orange");
        SendClientMessage(playerid, 0xFF00FFAA, "//////// <--------- /pink");
        SendClientMessage(playerid, 0xD4A017AA, "//////// <--------- /gold");
        SendClientMessage(playerid, 0x00FFFFAA, "//////// <--------- /aqua");
        SendClientMessage(playerid, 0x00FF00AA, "//////// <--------- /lime");
        SendClientMessage(playerid, 0x00000000, "//////// <--------- /black");
        SendClientMessage(playerid, 0xFFFFFFFF, "//////// <--------- /white");
        SendClientMessage(playerid, 0x6c6c6cAA, "//////// <--------- /grey");
        SendClientMessage(playerid, 0x800080AA, "//////// <--------- /purple");

                return 1;
    }
    return 0;
  }
  //////////  FINISHED  //////////////////////////////////////////////////////////
Reply
#3

Simplest and easy and it is based on dialogs

pawn Код:
#include <a_samp>
#include <Zcmd>
#define COLOR_WHITE 0xFFFFFFAA

CMD:colour(playerid,params[])
{
        ShowPlayerDialog(playerid,16, DIALOG_STYLE_LIST, "{FFFFFF}Color Pickup:","Red\nYellow\nBlue\nPink\nWhite\nGrad\nSilver", "Ok", "Cancel");
        return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 16)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerColor(playerid, 0xFF00FFF0);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Red");
            }
            if(listitem == 1)
            {
                SetPlayerColor(playerid, 0xFFFF00AA);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Yellow");
            }
            if(listitem == 2)
            {
                SetPlayerColor(playerid, 0x0000BBAA);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Blue");
            }
            if(listitem == 3)
            {
                SetPlayerColor(playerid, 0xFF66FFAA);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Pink");
            }
            if(listitem == 4)
            {
                SetPlayerColor(playerid, 0xFFFFFFAA);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to White");
            }
            if(listitem == 5)
            {
                SetPlayerColor(playerid, 0xB4B5B7FF);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Grad");
            }
            if(listitem == 6)
            {
                SetPlayerColor(playerid, 0x00F5FFFF);
                SendClientMessage(playerid,COLOR_WHITE,"You have set your name colour to Silver");
            }
        }
        return 0;
}
return 0;
}
Reply
#4

Thankyou for the scripts!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)