SendClientTextToAdmins
#1

Hey guys, i'm using Seifalk obviously by Seif_ and one of my functions SendClientMessageToAdmins:

pawn Код:
public SendClientMessageToAdmins(color,const string[],level)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (PlayerInfo[i][pAdmin] >= level)
            {
                SendClientMessage(i, color, string);
                printf("%s", string);
            }
        }
    }
    return 1;
}
doesnt work, when i change SendClientMessage too SendClientText it gives me this error:

pawn Код:
C:\Documents and Settings\Administrator\My Documents\My Pictures\Micks\SAMP\gamemodes\CubanRP.pwn(678) : error 035: argument type mismatch (argument 3)
this is the SendClientText callback:

pawn Код:
stock SendClientText(playerid, color, text[])
{
    for(new t = MAX_TEXTS-1; t > 0; t--)
    {
      TextDrawSetString(TextdrawInBox[playerid][t], TextInBox[playerid][t-1]);
    strmid(TextInBox[playerid][t], TextInBox[playerid][t-1], 0, strlen(TextInBox[playerid][t-1]), 128);
    TextColor[t] = TextColor[t-1];
    TextDrawColor(TextdrawInBox[playerid][t], TextColor[t]);
    TextDrawShowForPlayer(playerid, TextdrawInBox[playerid][t]);
    }
    TextDrawColor(TextdrawInBox[playerid][0], color);
    TextDrawSetString(TextdrawInBox[playerid][0], text);
  strmid(TextInBox[playerid][0], text, 0, strlen(text), 128);
  TextColor[0] = color;
  TextDrawShowForPlayer(playerid, TextdrawInBox[playerid][0]);
  return 1;
}
any ideas? thanks
Reply
#2

Quote:

when i change SendClientMessage too SendClientText it gives me this error:

What do you mean exactly?
Reply
#3

try changing
pawn Код:
stock SendClientText(playerid, color, text[])
to
pawn Код:
stock SendClientText(playerid, color, const text[])
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)