14.04.2016, 22:06
(
Последний раз редактировалось JonathanFeitosa; 16.04.2016 в 16:11.
)
Rapaziada eu coloquei esse comando /kick, mais quando vou testa ele nгo kika '-'
if(strcmp(cmdtext,"/kick",true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pCbf] >= 1)
SendClientMessage(playerid,0xFFFFFFAA,"Use /Kick [ID/Nome][Motivo]");
return 1;
}
new kickado = strval(tmp);
new kickadoname[MAX_PLAYER_NAME];
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
if(!strlen(result))
{
SendClientMessage(playerid,BRANCO,"Use /Kick[ID][Motivo]");
return 1;
}
GetPlayerName(kickado,kickadoname,sizeof(kickadona me));
format(string,sizeof(string),"%s Foi Kickado Pelo %s %s, Motivo: %s",kickadoname,pNome(playerid),result);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
if(strcmp(cmdtext,"/kick",true) == 0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pCbf] >= 1)
SendClientMessage(playerid,0xFFFFFFAA,"Use /Kick [ID/Nome][Motivo]");
return 1;
}
new kickado = strval(tmp);
new kickadoname[MAX_PLAYER_NAME];
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
if(!strlen(result))
{
SendClientMessage(playerid,BRANCO,"Use /Kick[ID][Motivo]");
return 1;
}
GetPlayerName(kickado,kickadoname,sizeof(kickadona me));
format(string,sizeof(string),"%s Foi Kickado Pelo %s %s, Motivo: %s",kickadoname,pNome(playerid),result);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}