27.11.2013, 16:36
nunca gostei mt de strtok, mas tenta ae
pawn Код:
if(strcmp(cmd, "/mega", true) == 0 || strcmp(cmd, "/mf", true) == 0)
{
if(PlayerInfo[playerid][pMuted] == 1)
return SendClientMessage(playerid, TEAM_CYAN_COLOR, "Vocк nгo pode falar, pois foi calado");
if(PlayerInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo e Um Admin!");
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, COLOR_GRAD2, "USE: (/m)egafone [megaphone chat]");
format(string, sizeof(string), "ADMIN %s :o< %s", sendername, result);
ProxDetector(60.0, playerid, string,COR_MEGA,COR_MEGA,COR_MEGA,COR_MEGA,COR_MEGA);
return 1;
}