04.07.2011, 15:06
Testa..
pawn Код:
if(!strcmp(cmd, "/gritar", true) || !strcmp(cmd, "/g", true))
{
if(!IsPlayerConnected(playerid)) return 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; }
new offset = idx, result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; }
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, 0xFF0000FF, "USO: (/g)ritar [local chat]");
if(FicarRoco[playerid] >= 5) return SendClientMessage(playerid,0xFF0000FF,"Vocк Estб Rouco! Vб atй uma farmбcia comprar Pastilha!."), SendClientMessage(playerid,0xFF0000FF,"OBS: A farmбcia fica em frente ao banco da cidade!.");
for(new i = 0x0; i < 6; ++i) {
if(strfind(result, IP[i], true) != -1)
{
result = "PКGO EM FRБGRANTE!!!Jogador tentando divulgar algum IP.";
}
}
format(string, sizeof(string), "%s Berra: %s!!", sendername, result);
FicarRoco[playerid]++;
printf("[chat] [grito] [%s] %s", sendername, result);
ProxDetector(30.0, playerid, string,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF,0xFF0000FF);
return 0x01;
}