Please view it
#1

I have create command giftcode is


Код:
CMD:giftcode(playerid, params[])
{
    new string[100];
    if(IsPlayerConnected(playerid))
    {
    	if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "SUDUNG: /giftcode [Number Code]");
		{
            new File:example = fopen("/GIFTCODE.txt", io_read);
			while(fread(example, string))
			{
				if(strcmp(string, "FDD00032SA", true) != -1 || strcmp(string, "FFDS3300LA", true) != -1)
       			{
					GivePlayerMoney(playerid, +200000);
					PlayerInfo[playerid][pLevel] += 2;
					fremove(string);
				 	fclose(example);
				 	return 1;
				}
			}
    	}
    	return 1;
    }
    return 1;
}
File GIFTCODE.TXT in /scriptfiles

Код:
FFFDSAA
DDADFAA
I have created one file in / filescript is giftcode.txt, I want the players to get their code to use / giftcode FDD00032SA, they ll get money and level but the import is completed in 1 file will delete that code and when they enter the code if the code does not exist, it will be reported as "your code entered is invalid". please help me finish it, thanks very much


Wishing everyone a happy 2014 and happy.

Sorry english bad.
Reply
#2

upppppppp
Reply
#3

Why not use mysql?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)