05.12.2009, 22:50
Hey guys, i'm using Seifalk obviously by Seif_ and one of my functions SendClientMessageToAdmins:
doesnt work, when i change SendClientMessage too SendClientText it gives me this error:
this is the SendClientText callback:
any ideas? thanks
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;
}
pawn Код:
C:\Documents and Settings\Administrator\My Documents\My Pictures\Micks\SAMP\gamemodes\CubanRP.pwn(678) : error 035: argument type mismatch (argument 3)
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;
}