PDA

Просмотр полной версии : [Вопрос] Перевод команы



codeo
01.07.2014, 19:52
Помогите перевести команду на dc_cmd


if(!strcmp(cmd,"/banegorange",true))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"/banegorange id");
new l = ReturnUser(tmp);
new ip[32];//ipv6
GetPlayerIp(l,ip,sizeof(ip))
new splitt[4][4];
split(ip,splitt,'.');
format(string,sizeof(string),"banip %s.%s.%s.*",splitt[0],splitt[1],splitt[2]);
SendRconCommand(string);
return 1;
}

DeimoS
01.07.2014, 20:04
Как-то так

CMD:banegorange(playerid, params[])
{
if(!strlen(params)) return SendClientMessage(playerid,-1,"/banegorange id");
if(!IsPlayerConnected(strval(params)) return SendClientMessage(playerid,-1,"Игрок не найден");
new player_ip[16];
GetPlayerIp(strval(params), player_ip, sizeof(player_ip))
format(string,sizeof(string),"banip %s", player_ip);
SendRconCommand(string);
return 1;
}