How to make army rights
#3

Try this, instead of 0 Put GetPlayerRights [function below]
and an easy command (/giverights)

pawn Код:
// BOTTOM OF SCRIPT
stock GetPlayerRights(playerid)
{
    return CanUseArmy[playerid];
}
pawn Код:
//OnPlayerCommandText
if(strcmp(cmd,"/giverights",true) == 0) if(IsPlayerAdmin(playerid))
{
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,COLOR,"USAGE: /giverights [playerid]");
    new giveplayerid = strval(tmp);
    new giveplayer[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
    GetPlayerName(playerid,sendername,sizeof(sendername));
    new string[128];
    format(string,sizeof(string),"[ ! ] You can now choose the army skin thanks to administrator %s",sendername);
    SendClientMessage(giveplayerid,COLOR,string);
    format(string,sizeof(string),"[ ! ] You have given %s rights to wear army skin",giveplayer);
    SendClientMessage(playerid,COLOR,string);
    CanUseArmy[giveplayerid] = 1;
    return 1;
}
if(strcmp(cmd,"/removerights",true) == 0) if(IsPlayerAdmin(playerid))
{
    tmp = strtok(cmdtext,idx);
    if(!strlen(tmp)) return SendClientMessage(playerid,COLOR,"USAGE: /removerights [playerid]");
    new giveplayerid = strval(tmp);
    new giveplayer[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
    GetPlayerName(playerid,sendername,sizeof(sendername));
    new string[128];
    format(string,sizeof(string),"[ ! ] Your rights for army has been reset by %s !",sendername);
    SendClientMessage(giveplayerid,COLOR,string);
    format(string,sizeof(string),"[ ! ] You have removed %s rights to wear army skin",giveplayer);
    SendClientMessage(playerid,COLOR,string);
    SendClientMessage(giveplayerid,COLOR,"[ ! ] You are kicked !");
    Kick(giveplayerid);
    CanUseArmy[giveplayerid] = 0;
    return 1;
}

Reply


Messages In This Thread
How to make army rights - by killdahobo99 - 19.08.2009, 00:58
Re: How to make army rights - by snoob - 19.08.2009, 01:39
Re: How to make army rights - by coole210 - 19.08.2009, 03:24
Re: How to make army rights - by Calgon - 19.08.2009, 04:14
Re: How to make army rights - by killdahobo99 - 19.08.2009, 13:42
Re: How to make army rights - by coole210 - 19.08.2009, 18:23
Re: How to make army rights - by Hoss - 17.10.2010, 12:38
Re: How to make army rights - by CrucixTM - 17.10.2010, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)