public OnPlayerText(playerid, text[])
{
new pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
new str[128];
format(str, sizeof(str), "%s[%i]: %s", pname, playerid, text);
if(TextColor[playerid] == None)
{
SendClientMessageToAll(0xFFFFFFAA, str);
}
if(TextColor[playerid] == Red)
{
SendClientMessageToAll(0xFF0000AA, str);
}
if(TextColor[playerid] == Orange)
{
SendClientMessageToAll(0xFFA500AA, str);
}
if(TextColor[playerid] == Yellow)
{
SendClientMessageToAll(0xFFFF00AA, str);
}
if(TextColor[playerid] == Green)
{
SendClientMessageToAll(0x00FF00AA, str);
}
if(TextColor[playerid] == Blue)
{
SendClientMessageToAll(0x0000FFAA, str);
}
if(TextColor[playerid] == Purple)
{
SendClientMessageToAll(0x800080AA, str);
}
if(TextColor[playerid] == Grey)
{
SendClientMessageToAll(0x808080AA, str);
}
if(TextColor[playerid] == Cyan)
{
SendClientMessageToAll(0x00FFFFAA, str);
}
if(TextColor[playerid] == Pink)
{
SendClientMessageToAll(0xFF00FFAA, str);
}
return 0;
}
public OnPlayerConnect(playerid)
{
TextColor[playerid] = None;
return 1;
}
TextColor[playerid] = Blue;
#define Blue 1
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == TextDialog)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
TextColor[playerid] = Red;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected red text.");
}
case 1:
{
TextColor[playerid] = Orange;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected orange text.");
}
case 2:
{
TextColor[playerid] = Yellow;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected yellow text.");
}
case 3:
{
TextColor[playerid] = Green;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected green text.");
}
case 4:
{
TextColor[playerid] = Blue;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected blue text.");
}
case 5:
{
TextColor[playerid] = Purple;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected purple text.");
}
case 6:
{
TextColor[playerid] = Grey;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected grey text.");
}
case 7:
{
TextColor[playerid] = Cyan;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected cyan text.");
}
case 8:
{
TextColor[playerid] = Pink;
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected pink text.");
}
}
}
return 1;
}
This is not how PAWN works, you cannot do something like
pawn Код:
pawn Код:
|