[HELP] hitman agency fake badges
#5

I tired
pawn Code:
if(strcmp(cmd,"/fbadge",true)==0)
    {
        if(IsPlayerConnected(playerid))
        {
                if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
                {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fbadge[playerid/PartOfName]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        if (ProxDetectorS(8.0, playerid, giveplayerid))
                        {
                            if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cant show your badge to yourself, stupid!"); return 1; }
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* %s takes out his/her badge from his/her pocket.", sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** Rank/Name: Chief %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** Rank/Name: Deputy Chief %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Rank/Name: Captain %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Rank/Name: Lieutenant %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Rank/Name: Sergeant %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Rank/Name: Corporal %s*", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Rank/Name: Police Officer %s", sendername); }
                            else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Rank/Name: Cadet %s", sendername); }
                            SendClientMessage(giveplayerid, COLOR_GREY, string);
                            format(string, sizeof(string), "* %s has shown his/her badge to you.", sendername);
                            SendClientMessage(giveplayerid, COLOR_GREY, string);
                            format(string, sizeof(string), "* You have shown your Fake Badge to %s.", giveplayer);
                            SendClientMessage(playerid, COLOR_GREY, string);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   That player is not near you!");
                            return 1;
                        }
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   That player is Offline!");
                    return 1;
                }
            }
        }
        return 1;
    }
Reply


Messages In This Thread
[HELP] hitman agency fake badges - by valspure - 09.05.2012, 22:46
Re: [HELP] hitman agency fake badges - by Ubuntu - 10.05.2012, 03:09
Re: [HELP] hitman agency fake badges - by valspure - 10.05.2012, 22:04
Re: [HELP] hitman agency fake badges - by dannyk0ed - 10.05.2012, 22:19
Re: [HELP] hitman agency fake badges - by dannyk0ed - 10.05.2012, 22:21
Re: [HELP] hitman agency fake badges - by milanosie - 10.05.2012, 22:26
Re: [HELP] hitman agency fake badges - by ToiletDuck - 11.05.2012, 01:15
Re: [HELP] hitman agency fake badges - by milanosie - 11.05.2012, 07:09
Re: [HELP] hitman agency fake badges - by JamieN - 15.06.2012, 19:21
Re: [HELP] hitman agency fake badges - by XtremeYlorD - 10.07.2012, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)