How to put command Rcon??
#1

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;
}
Reply
#2

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
Reply
#3

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;
}
Reply
#4

Код:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)