Salve, ho un piccolo problemino
![Chessygrin :D](./images/smilies/icon_cheesygrin.gif)
... mi sono perso in un bicchiere d'acqua! Qualcuno di voi può convertire questi tre comandi da zcmd in cmd ( comandi standard di pawno) ?
Codice:
COMMAND:ban(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: You need to be logged in as an RCON administrator to perform this!");
if(sscanf(params, "uis", ban_target, ban_time, ban_reason)) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BAN]: Correct usage -> /ban <player> <time (minutes)> <reason>");
if(!IsPlayerConnected(ban_target)) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: Player was not found!");
if(ban_time < 0) SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: Please input a valid ban time!");
format(post_string, sizeof(post_string), "action=addban&apikey="#APIKEY"&ban_user=%s&ban_reason=%s&ban_admin=%s&ban_ip=%s&ban_time=%d",names[ban_target], ban_reason, names[playerid], ips[ban_target], ban_time);
HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnBanResponse");
Kick(ban_target);
return 1;
}
COMMAND:unbanbyip(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: You need to be logged in as an RCON administrator to perform this!");
if(isnull(params) || strlen(params) > MAX_PLAYER_IP) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: Correct usage -> /unbanbyip <ip address>");
format(post_string, sizeof(post_string), "action=remip&apikey="#APIKEY"&ban_ip=%s", params);
HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnRemoveResponse");
return 1;
}
COMMAND:unbanbyname(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: You need to be logged in as an RCON administrator to perform this!");
if(isnull(params) || strlen(params) > MAX_PLAYER_NAME) return SendClientMessage(playerid, COLOR_RED, "[SAMP-BANS]: Correct usage -> /unbanbyname <name>");
format(post_string, sizeof(post_string), "action=remname&apikey="#APIKEY"&ban_name=%s&expired=true", params);
HTTP(playerid, HTTP_POST, APIPATH, post_string, "OnRemoveResponse");
return 1;
}