Promote command.
#2

pawn Код:
#include <a_samp>
#include <zcmd>


CMD:giverights(playerid, params[])
{
    if(PlayerInfo[playerid][pRights] < 3) return 0;
    new target, rights[64], str[128], Playername[MAX_PLAYER_NAME], Adminname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Adminname, sizeof(Adminname));
    GetPlayerName(target, Playername, sizeof(Playername));
    if(sscanf(params, "us[64]", target,rights)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] [reason]");
    if(!IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected!");
    PlayerInfo[target][pRights] = rights;
    return 1;
}
ZCMD commands shouldn't be placed under OnPlayerCommandText.
Also fixed some other errors for you as you can examine.
Reply


Messages In This Thread
Promote command. - by xX4m4zingXx - 18.01.2015, 10:36
Re: Promote command. - by CalvinC - 18.01.2015, 10:45
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 11:31
Re: Promote command. - by CalvinC - 18.01.2015, 14:10
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 15:35
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 20:39
Re: Promote command. - by nezo2001 - 18.01.2015, 20:42
Re: Promote command. - by xX4m4zingXx - 18.01.2015, 20:48
Re: Promote command. - by nezo2001 - 18.01.2015, 21:05
Re: Promote command. - by xX4m4zingXx - 23.01.2015, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)