Passport Bug!
#7

Код:
if(strcmp(cmd, "/givepassport", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new name2[24];
            GetPlayerName(giveplayer, name2, 24);
            if(!IsACop(playerid))
            {
                SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
                return 1;
            }
            if(PlayerInfo[playerid][pRank] >= 4)
            {
                if(PlayerInfo[playerid][pDBanned] == 1)
                {
                    SendClientMessage(playerid, COLOR_CREAM, "You are banned from cop duty.");
                    return 1;
                }
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_CREAM, "USAGE: /givepassport [playerid]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(giveplayerid, sendername, sizeof(sendername));
                        if(PlayerInfo[giveplayerid][pPassport] == 1) return SendClientMessage(playerid, COLOR_GREY, "This player has a passport already!");
                        PlayerInfo[giveplayerid][pPassport] = 1;
                        format(string, sizeof(string),"You gave a passport to %s.",giveplayer);
                        SendClientMessage(playerid, COLOR_GREY, string);
                        format(string, sizeof(string),"%s gave you a passport. You are now a citizen..",sendername);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        format(string, sizeof(string),"[ADMIN]: %s gave a passport to %s.",sendername,name2);
                        SendAdminMessage(COLOR_LIGHTRED, string);
                        new y, m, d;
                        new h,mi,s;
                        getdate(y,m,d);
                        gettime(h,mi,s);
                        format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /givepassport %s",d,m,y,h,mi,s,giveplayer, sendername);
                        AdminLog(string);
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   That player is Offline !");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, " You need to be rank 4 or above.");
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
Passport Bug! - by Oscii - 25.05.2012, 18:33
Re: Passport Bug! - by milanosie - 25.05.2012, 18:36
Re: Passport Bug! - by Oscii - 25.05.2012, 18:38
Re: Passport Bug! - by milanosie - 25.05.2012, 18:39
Re: Passport Bug! - by Oscii - 25.05.2012, 18:42
Re: Passport Bug! - by milanosie - 25.05.2012, 18:45
AW: Passport Bug! - by EthanR - 25.05.2012, 19:16
Re: Passport Bug! - by Oscii - 25.05.2012, 19:23
Re: Passport Bug! - by milanosie - 25.05.2012, 19:24
Re: Passport Bug! - by MadeMan - 25.05.2012, 19:27
Re: Passport Bug! - by Oscii - 25.05.2012, 19:30

Forum Jump:


Users browsing this thread: 2 Guest(s)