Credit Cards
#4

Quote:
Originally Posted by marine
Посмотреть сообщение
You're right about the SetPlayerInfo. lol.
for the else if, some players do will not have [pCreditCard] in their .ini file so i need to somehow add it if they do not have it.
Look at the new comments:
you better use when a player registers add this:
dini_IntSet(string3, "CreditCard",0); //(i dunno what string3 is, probly username?)
pawn Код:
if(strcmp(cmd, "/buycc", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pCreditCard] == 0) //If the player has not a credit card
            {
                PlayerInfo[playerid][pCreditCard] = 1; // Set a creditcard
                   dini_IntSet(string3, "CreditCard",PlayerInfo[playerid][pCreditCard]); // Better save it after buying
            }
            else if(PlayerInfo[playerid][pCreditCard] == 1)// If the player Has a credit card
                {
                 SendClientMessage(playerid,COLOR_RED,"ERROR: You already have a CC!");
                }
        }
    }
Reply


Messages In This Thread
Credit Cards - by marine - 24.02.2011, 12:03
Re: Credit Cards - by DaneAMattie - 24.02.2011, 12:06
Re: Credit Cards - by marine - 24.02.2011, 12:13
Re: Credit Cards - by DaneAMattie - 24.02.2011, 12:21
Re: Credit Cards - by marine - 24.02.2011, 12:26
Re: Credit Cards - by DaneAMattie - 24.02.2011, 12:28
Re: Credit Cards - by marine - 24.02.2011, 12:34
Re: Credit Cards - by marine - 24.02.2011, 12:39
Re: Credit Cards - by DaneAMattie - 24.02.2011, 12:41

Forum Jump:


Users browsing this thread: 1 Guest(s)