Jump to content
  • 0

problema comanda /setcolor


crazyzee

Question

Salut am si eu comanda /setcolor insa cand dau /setcolor [ id player] white nu se face culoarea alba se fac negru si nu se mai vede useru pe TAB .

[pawn]if(strcmp(cmd, "/setcolor", true) == 0)

{

        if(IsPlayerConnected(playerid))

        {

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setcolor [playerid/PartOfName] ");

SendClientMessage(playerid, COLOR_GREY, "Available colors: White");

return 1;

}

new playa;

new color;

playa = ReturnUser(tmp);

tmp = strtok(cmdtext, idx);

color = strval(tmp);

if (PlayerInfo[playerid][pAdmin] >= 1338)

{

  if(IsPlayerConnected(playa))

  {

    if(playa != INVALID_PLAYER_ID)

    {

SetPlayerColor(playa, color);

}

}

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

}

}

return 1;

}[/pawn]

//Shades of Grey
#define WHITE 0xFFFFFFFF

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Prima data defineste toate culorile folosite la /setcolor, un exemplu:

[pawn]//Shades of pink

#define PINK 0xFFC0CBFF

#define LIGHTPINK 0xFFB6C1FF

#define HOTPINK 0xFF69B4FF

#define DEEPPINK 0xFF1493FF

#define MEDIUMVIOLETRED 0xC71585FF

#define PALEVIOLETRED 0xDB7093FF

//Shades of Orange

#define CORAL 0xFF7F50FF

#define TOMATO 0xFF6347FF

#define ORANGERED 0xFF4500FF

#define DARKORANGE 0xFF8C00FF

#define ORANGE 0xFFA500FF

//Shades of Yellow

#define GOLD 0xFFD700FF

#define YELLOW 0xFFFF00FF

#define LIGHTYELLOW 0xFFFFE0FF

#define LEMONCHIFFON 0xFFFACDFF

#define LIGHTGOLDENRODYELLOW 0xFAFAD2FF

#define PAPAYAWHIP 0xFFEFD5FF

#define MOCCASIN 0xFFE4B5FF

#define PEACHPUFF 0xFFDAB9FF

#define PALEGOLDENROD 0xEEE8AAFF

#define KHAKI 0xF0E68CFF

#define DARKKHAKI 0xBDB76BFF

//Shades of Purple

#define LAVENDER 0xE6E6FAFF

#define THISTLE 0xD8BFD8FF

#define PLUM 0xDDA0DDFF

#define VIOLET 0xEE82EEFF

#define ORCHID 0xDA70D6FF

#define FUCHSIA 0xFF00FFFF

#define MAGENTA 0xFF00FFFF

#define MEDIUMORCHID 0xBA55D3FF

#define MEDIUMPURPLE 0x9370DBFF

#define AMETHYST 0x9966CCFF

#define BLUEVIOLET 0x8A2BE2FF

#define DARKVIOLET 0x9400D3FF

#define DARKORCHID 0x9932CCFF

#define DARKMAGENTA 0x8B008BFF

#define PURPLE 0x800080FF

#define INDIGO 0x4B0082FF

#define SLATEBLUE 0x6A5ACDFF

#define DARKSLATEBLUE 0x483D8BFF

#define MEDIUMSLATEBLUE 0x7B68EEFF

//Shades of Green

#define GREENYELLOW 0xADFF2FFF

#define CHARTREUSE 0x7FFF00FF

#define LAWNGREEN 0x7CFC00FF

#define LIME 0x00FF00FF

#define LIMEGREEN 0x32CD32FF

#define PALEGREEN 0x98FB98FF

#define LIGHTGREEN 0x90EE90FF

#define MEDIUMSPRINGGREEN 0x00FA9AFF

#define SPRINGGREEN 0x00FF7FFF

#define MEDIUMSEAGREEN 0x3CB371FF

#define SEAGREEN 0x2E8B57FF

#define FORESTGREEN 0x228B22FF

#define GREEN 0x008000FF

#define DARKGREEN 0x006400FF

#define YELLOWGREEN 0x9ACD32FF

#define OLIVEDRAB 0x6B8E23FF

#define OLIVE 0x808000FF

#define DARKOLIVEGREEN 0x556B2FFF

#define MEDIUMAQUAMARINE 0x66CDAAFF

#define DARKSEAGREEN 0x8FBC8FFF

#define LIGHTSEAGREEN 0x20B2AAFF

#define DARKCYAN 0x008B8BFF

#define TEAL 0x008080FF

//Shades of Blue/Cyan

#define AQUA 0x00FFFFFF

#define CYAN 0x00FFFFFF

#define LIGHTCYAN 0xE0FFFFFF

#define PALETURQUOISE 0xAFEEEEFF

#define AQUAMARINE 0x7FFFD4FF

#define TURQUOISE 0x40E0D0FF

#define MEDIUMTURQUOISE 0x48D1CC

#define DARKTURQUOISE 0x00CED1FF

#define CADETBLUE 0x5F9EA0FF

#define STEELBLUE 0x4682B4FF

#define LIGHTSTEELBLUE 0xB0C4DEFF

#define POWDERBLUE 0xB0E0E6FF

#define LIGHTBLUE 0xADD8E6FF

#define SKYBLUE 0x87CEEBFF

#define LIGHTSKYBLUE 0x87CEFAFF

#define DEEPSKYBLUE 0x00BFFFFF

#define DODGERBLUE 0x1E90FFFF

#define CORNFLOWERBLUE 0x6495EDFF

#define MEDIUMSLATEBLUE 0x7B68EEFF

#define ROYALBLUE 0x4169E1FF

#define BLUE 0x0000FFFF

#define MEDIUMBLUE 0x0000CDFF

#define DARKBLUE 0x00008BFF

#define NAVY 0x000080FF

#define MIDNIGHTBLUE 0x191970FF

//Shades of Brown

#define CORNSILK 0xFFF8DCFF

#define BLANCHEDALMOND 0xFFEBCDFF

#define BISQUE 0xFFE4C4FF

#define NAVAJOWHITE 0xFFDEADFF

#define WHEAT 0xF5DEB3FF

#define BURLYWOOD 0xDEB887FF

#define TAN 0xD2B48CFF

#define ROSYBROWN 0xBC8F8FFF

#define SANDYBROWN 0xF4A460FF

#define DARKGOLDENROD 0xB8860BFF

#define PERU 0xCD853FFF

#define SADDLEBROWN 0x8B4513FF

#define SIENNA 0xA0522DFF

#define BROWN 0xA52A2AFF

#define MAROON 0x800000FF

//Shades of Grey

#define WHITE 0xFFFFFFFF

#define GAINSBORO 0xDCDCDCFF

#define LIGHTGREY 0xD3D3D3FF

#define SILVER 0xC0C0C0FF

#define DARKGRAY 0xA9A9A9FF

#define GRAY 0x808080FF

#define DIMGRAY 0x696969FF

#define LIGHTSLATEGRAY 0x778899FF

#define SLATEGRAY 0x708090FF

#define DARKSLATEGRAY 0x2F4F4FFF

#define BLACK 0x000000FF

#define yellow 0xFFFF00AA

#define green 0x33FF33AA

#define red 0xFF0000AA

#define white 0xFFFFFFAA

#define pink 0xCCFF00FFAA

#define blue 0x00FFFFAA

#define grey 0xC0C0C0AA[/pawn]

Dupa aceea, comanda v-a fi asa /setcolor:

[pawn]//---------- setcolor------

if(strcmp(cmd, "/setcolor", true) == 0)

{

  if(IsPlayerConnected(playerid)) {

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp)) {

      SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setcolor [playerid/PartOfName] ");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: IndianRed, Lightcoral, Salmon, DarkSalmon, Lightsalmon, Crimson, Red, Firebrick, Darkred");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Pink, Lightpink, Hotpink, Deeppink, Mediumvioletred, palevioletred");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Coral, Tomato, OrangeRed, Darkorange, Orange");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Gold, Yellow, LightYellow, LemonChiffon, Lightgoldenrodyellow, Papayawhip, Moccasin, Peachpuff, Palegoldenrod, Khaki, Darkkhaki");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Lavender, Thistle, Plum, Violet, Orchid, Fuchsta, Magenta, Mediumorchid, MediumPurple, Amethyst, Blueviolet, DarkOrchid, DarkMagenta, Purple");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Greenyellow, Chartreuse, lawngreed, lime, limegreen, palegreen, lightgreen, springgreen, seagreen, forestgreen, green");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Aqua, Cyan, Lightcyan, plaeturquoise, quamarine, turquoise, mediumturquoise, cadetblue, steelblue, lightsteelblue, blue");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Cornsilk, Blanchedalmond, bisque, navajowhite, wheat, burlywood, tan, rosybrown, darkgoldenrod, peru, brown");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: White, Lightgrey, Silver, Darkgray, Gray, Dimgray, Lightslategray, darkslategray, black");

      return 1;

    }

    new playa;

    new color;

    tmp = strtok(cmdtext, idx);

    playa = ReturnUser(tmp);

    color = strval(tmp);

    if (PlayerInfo[playerid][pAdmin] >= 1338) {

      if(IsPlayerConnected(playa)) {

        if(playa != INVALID_PLAYER_ID) {

          SetPlayerColor(playa, color);

          return 1;

        }

      }

    }

    else {

      SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

    }

  }

  return 1;

}[/pawn]

Sper ca te-am ajutat, bafta!

Rareori ne gândim la ceea ce avem, dar mereu la ceea ce ne lipseşte

Link to comment
Share on other sites

Prima data defineste toate culorile folosite la /setcolor, un exemplu:

[pawn]//Shades of pink

#define PINK 0xFFC0CBFF

#define LIGHTPINK 0xFFB6C1FF

#define HOTPINK 0xFF69B4FF

#define DEEPPINK 0xFF1493FF

#define MEDIUMVIOLETRED 0xC71585FF

#define PALEVIOLETRED 0xDB7093FF

//Shades of Orange

#define CORAL 0xFF7F50FF

#define TOMATO 0xFF6347FF

#define ORANGERED 0xFF4500FF

#define DARKORANGE 0xFF8C00FF

#define ORANGE 0xFFA500FF

//Shades of Yellow

#define GOLD 0xFFD700FF

#define YELLOW 0xFFFF00FF

#define LIGHTYELLOW 0xFFFFE0FF

#define LEMONCHIFFON 0xFFFACDFF

#define LIGHTGOLDENRODYELLOW 0xFAFAD2FF

#define PAPAYAWHIP 0xFFEFD5FF

#define MOCCASIN 0xFFE4B5FF

#define PEACHPUFF 0xFFDAB9FF

#define PALEGOLDENROD 0xEEE8AAFF

#define KHAKI 0xF0E68CFF

#define DARKKHAKI 0xBDB76BFF

//Shades of Purple

#define LAVENDER 0xE6E6FAFF

#define THISTLE 0xD8BFD8FF

#define PLUM 0xDDA0DDFF

#define VIOLET 0xEE82EEFF

#define ORCHID 0xDA70D6FF

#define FUCHSIA 0xFF00FFFF

#define MAGENTA 0xFF00FFFF

#define MEDIUMORCHID 0xBA55D3FF

#define MEDIUMPURPLE 0x9370DBFF

#define AMETHYST 0x9966CCFF

#define BLUEVIOLET 0x8A2BE2FF

#define DARKVIOLET 0x9400D3FF

#define DARKORCHID 0x9932CCFF

#define DARKMAGENTA 0x8B008BFF

#define PURPLE 0x800080FF

#define INDIGO 0x4B0082FF

#define SLATEBLUE 0x6A5ACDFF

#define DARKSLATEBLUE 0x483D8BFF

#define MEDIUMSLATEBLUE 0x7B68EEFF

//Shades of Green

#define GREENYELLOW 0xADFF2FFF

#define CHARTREUSE 0x7FFF00FF

#define LAWNGREEN 0x7CFC00FF

#define LIME 0x00FF00FF

#define LIMEGREEN 0x32CD32FF

#define PALEGREEN 0x98FB98FF

#define LIGHTGREEN 0x90EE90FF

#define MEDIUMSPRINGGREEN 0x00FA9AFF

#define SPRINGGREEN 0x00FF7FFF

#define MEDIUMSEAGREEN 0x3CB371FF

#define SEAGREEN 0x2E8B57FF

#define FORESTGREEN 0x228B22FF

#define GREEN 0x008000FF

#define DARKGREEN 0x006400FF

#define YELLOWGREEN 0x9ACD32FF

#define OLIVEDRAB 0x6B8E23FF

#define OLIVE 0x808000FF

#define DARKOLIVEGREEN 0x556B2FFF

#define MEDIUMAQUAMARINE 0x66CDAAFF

#define DARKSEAGREEN 0x8FBC8FFF

#define LIGHTSEAGREEN 0x20B2AAFF

#define DARKCYAN 0x008B8BFF

#define TEAL 0x008080FF

//Shades of Blue/Cyan

#define AQUA 0x00FFFFFF

#define CYAN 0x00FFFFFF

#define LIGHTCYAN 0xE0FFFFFF

#define PALETURQUOISE 0xAFEEEEFF

#define AQUAMARINE 0x7FFFD4FF

#define TURQUOISE 0x40E0D0FF

#define MEDIUMTURQUOISE 0x48D1CC

#define DARKTURQUOISE 0x00CED1FF

#define CADETBLUE 0x5F9EA0FF

#define STEELBLUE 0x4682B4FF

#define LIGHTSTEELBLUE 0xB0C4DEFF

#define POWDERBLUE 0xB0E0E6FF

#define LIGHTBLUE 0xADD8E6FF

#define SKYBLUE 0x87CEEBFF

#define LIGHTSKYBLUE 0x87CEFAFF

#define DEEPSKYBLUE 0x00BFFFFF

#define DODGERBLUE 0x1E90FFFF

#define CORNFLOWERBLUE 0x6495EDFF

#define MEDIUMSLATEBLUE 0x7B68EEFF

#define ROYALBLUE 0x4169E1FF

#define BLUE 0x0000FFFF

#define MEDIUMBLUE 0x0000CDFF

#define DARKBLUE 0x00008BFF

#define NAVY 0x000080FF

#define MIDNIGHTBLUE 0x191970FF

//Shades of Brown

#define CORNSILK 0xFFF8DCFF

#define BLANCHEDALMOND 0xFFEBCDFF

#define BISQUE 0xFFE4C4FF

#define NAVAJOWHITE 0xFFDEADFF

#define WHEAT 0xF5DEB3FF

#define BURLYWOOD 0xDEB887FF

#define TAN 0xD2B48CFF

#define ROSYBROWN 0xBC8F8FFF

#define SANDYBROWN 0xF4A460FF

#define DARKGOLDENROD 0xB8860BFF

#define PERU 0xCD853FFF

#define SADDLEBROWN 0x8B4513FF

#define SIENNA 0xA0522DFF

#define BROWN 0xA52A2AFF

#define MAROON 0x800000FF

//Shades of Grey

#define WHITE 0xFFFFFFFF

#define GAINSBORO 0xDCDCDCFF

#define LIGHTGREY 0xD3D3D3FF

#define SILVER 0xC0C0C0FF

#define DARKGRAY 0xA9A9A9FF

#define GRAY 0x808080FF

#define DIMGRAY 0x696969FF

#define LIGHTSLATEGRAY 0x778899FF

#define SLATEGRAY 0x708090FF

#define DARKSLATEGRAY 0x2F4F4FFF

#define BLACK 0x000000FF

#define yellow 0xFFFF00AA

#define green 0x33FF33AA

#define red 0xFF0000AA

#define white 0xFFFFFFAA

#define pink 0xCCFF00FFAA

#define blue 0x00FFFFAA

#define grey 0xC0C0C0AA[/pawn]

Dupa aceea, comanda v-a fi asa /setcolor:

[pawn]//---------- setcolor------

if(strcmp(cmd, "/setcolor", true) == 0)

{

  if(IsPlayerConnected(playerid)) {

    tmp = strtok(cmdtext, idx);

    if(!strlen(tmp)) {

      SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setcolor [playerid/PartOfName] ");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: IndianRed, Lightcoral, Salmon, DarkSalmon, Lightsalmon, Crimson, Red, Firebrick, Darkred");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Pink, Lightpink, Hotpink, Deeppink, Mediumvioletred, palevioletred");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Coral, Tomato, OrangeRed, Darkorange, Orange");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Gold, Yellow, LightYellow, LemonChiffon, Lightgoldenrodyellow, Papayawhip, Moccasin, Peachpuff, Palegoldenrod, Khaki, Darkkhaki");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Lavender, Thistle, Plum, Violet, Orchid, Fuchsta, Magenta, Mediumorchid, MediumPurple, Amethyst, Blueviolet, DarkOrchid, DarkMagenta, Purple");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Greenyellow, Chartreuse, lawngreed, lime, limegreen, palegreen, lightgreen, springgreen, seagreen, forestgreen, green");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Aqua, Cyan, Lightcyan, plaeturquoise, quamarine, turquoise, mediumturquoise, cadetblue, steelblue, lightsteelblue, blue");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: Cornsilk, Blanchedalmond, bisque, navajowhite, wheat, burlywood, tan, rosybrown, darkgoldenrod, peru, brown");

      SendClientMessage(playerid, COLOR_GREY, "Available colors: White, Lightgrey, Silver, Darkgray, Gray, Dimgray, Lightslategray, darkslategray, black");

      return 1;

    }

    new playa;

    new color;

    tmp = strtok(cmdtext, idx);

    playa = ReturnUser(tmp);

    color = strval(tmp);

    if (PlayerInfo[playerid][pAdmin] >= 1338) {

      if(IsPlayerConnected(playa)) {

        if(playa != INVALID_PLAYER_ID) {

          SetPlayerColor(playa, color);

          return 1;

        }

      }

    }

    else {

      SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

    }

  }

  return 1;

}[/pawn]

Sper ca te-am ajutat, bafta!

Pai da man , asa am avuto prima data si era la fel , eu nu am nevoie decat de culoarea alba asa ca am lasat doar culoarea alba insa nu merge .. :-"

RPG.VIBEPLAY.RO

Recomand acest server Romanesc bY woozie aka. weedluver aka. undertaker !!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.