02.11.2013, 14:12
@edit
aqui n deu erro nenhum '-'
pawn Код:
if (strcmp(cmd, "/cnn", true) == 0)
{
if (IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][Level] >= 1)
{
new cmdtext[20];
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[100];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if (!strlen(result))
{
SendClientMessage(playerid, -1, "USE: /cnn [cnn formato ~n~=NovaLinha ~r~=Vermelho ~g~=Verde ~b~=Azul ~w~=Branco ~y~=Amarelo ~l~=Preto]");
return true;
}
format(string, sizeof(string), "~b~Capetinha: ~w~%s", result);
}
else
{
format(string, sizeof(string), "~b~%s: ~w~%s", sendername, result);
}
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GameTextForPlayer(i, string, 5000, 3);
}
}
return true;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!");
return true;
}
}
return true;
}
aqui n deu erro nenhum '-'