How to put command Rcon?? -
Chery - 11.11.2013
Anyone can put the command in rcon required
Код:
CMD:makehelper(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] > 6)
{
new playerb, string[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /makehelper [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pHelper])
{
PlayerInfo[playerb][pHelper] = 1;
format(string, sizeof(string), "%s has {33AA33}promoted {AA3333}%s to a Community Helper.", RPN(playerid), RPN(playerb));
SendHelperMessage(COLOR_DARKRED, 1, string);
SendAdminMessage(COLOR_DARKRED, 1, string);
SendClientMessage(playerb, COLOR_DARKRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
Respuesta: How to put command Rcon?? -
Cerealguy - 11.11.2013
pawn Код:
CMD:makehelper(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] > 6 || IsPlayerAdmin(playerid)) // add IsPlayerAdmin(playerid))
{
new playerb, string[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /makehelper [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pHelper])
{
PlayerInfo[playerb][pHelper] = 1;
format(string, sizeof(string), "%s has {33AA33}promoted {AA3333}%s to a Community Helper.", RPN(playerid), RPN(playerb));
SendHelperMessage(COLOR_DARKRED, 1, string);
SendAdminMessage(COLOR_DARKRED, 1, string);
SendClientMessage(playerb, COLOR_DARKRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
command use with rcon
Re: How to put command Rcon?? -
-=Dar[K]Lord=- - 11.11.2013
pawn Код:
CMD:makehelper(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(IsPlayerAdmin(playerid))
{
new playerb, string[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /makehelper [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pHelper])
{
PlayerInfo[playerb][pHelper] = 1;
format(string, sizeof(string), "%s has {33AA33}promoted {AA3333}%s to a Community Helper.", RPN(playerid), RPN(playerb));
SendHelperMessage(COLOR_DARKRED, 1, string);
SendAdminMessage(COLOR_DARKRED, 1, string);
SendClientMessage(playerb, COLOR_DARKRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
Re: How to put command Rcon?? -
PakistaniBaba - 11.11.2013
Код:
CMD:makehelper(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(IsPlayerAdmin(playerid)) // now its rcon cmd
{
new playerb, string[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /makehelper [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pHelper])
{
PlayerInfo[playerb][pHelper] = 1;
format(string, sizeof(string), "%s has {33AA33}promoted {AA3333}%s to a Community Helper.", RPN(playerid), RPN(playerb));
SendHelperMessage(COLOR_DARKRED, 1, string);
SendAdminMessage(COLOR_DARKRED, 1, string);
SendClientMessage(playerb, COLOR_DARKRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "First login from RCON then use this CMD.");
}
return 1;
}