Help here a bit
#1

I want so you must be near the player to use this cmd can someone help me?

pawn Код:
}
    if(strcmp(cmd, "/giveweaponlicense", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pFaction] == 1 && PlayerInfo[playerid][pRank] <= 3 || PlayerInfo[playerid][pAdministrator] > 0)
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /giveweaponlicense [playerid/partofname]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        new wep1[128];
                        PlayerInfo[giveplayerid][pWepLic] = 1;
                        format(wep1, sizeof(wep1), "gives %s a weapon license.",GetPlayerNameEx(giveplayerid));
                        PlayerActionMessage(playerid,15.0,wep1);
                        new give1[128];
                        format(give1, sizeof(give1), "You have given %s a weapon license.", GetPlayerNameEx(giveplayerid));
                        SendClientMessage(playerid, COLOR_WHITE, give1);
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_LIGHTRED, "Playerid is not an active playerid");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "You are not a police officer!");
            }
        }
        return 1;
Reply


Messages In This Thread
Help here a bit - by N0FeaR - 07.04.2012, 23:54
Re: Help here a bit - by Boooth - 08.04.2012, 00:01
Re: Help here a bit - by [DOG]irinel1996 - 08.04.2012, 00:02
Re: Help here a bit - by Boooth - 08.04.2012, 00:14
Re: Help here a bit - by N0FeaR - 08.04.2012, 00:15
Re: Help here a bit - by [DOG]irinel1996 - 08.04.2012, 00:20

Forum Jump:


Users browsing this thread: 1 Guest(s)