SA-MP Forums Archive
SendClientTextToAdmins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendClientTextToAdmins (/showthread.php?tid=112158)



SendClientTextToAdmins - [NYRP]Mike. - 05.12.2009

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


Re: SendClientTextToAdmins - Grim_ - 05.12.2009

Quote:

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

What do you mean exactly?


Re: SendClientTextToAdmins - LarzI - 06.12.2009

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