SHOP System problem
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
PHP код:
if(dialogid == DIALOG_VSHOP// Misc
    
{
        if(
response)
        {
            if(
listitem == 0)
            {
            if(
PlayerInfo[playerid][Cookies] < 10000) return SendClientMessage(playerid,  -1"{FF0000}ERROR : You dont have enough cookies to be V.I.P 1!");
            if(
PlayerInfo[playerid][LoggedIn] == && PlayerInfo[playerid][Vip] == 0)//logged is an example.Replace it with your login variable.
            
{
                
PlayerInfo[playerid][Vip] = 1;
                
PlayerInfo[playerid][Cookies] -= 10000;
                
GameTextForPlayer(playerid,"Vip Promoted"20003);
                
SendClientMessage(playerid, -1"{00FF40}You have received {FF0000}V.I.P {00FF40}Status 1");
                
SendClientMessage(playerid, -1"{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands");
                
SavePlayer(playerid);
            }
            else 
SendClientMessage(playerid, -1"{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 1");
            }
            if(
listitem == 1)
            {
            if(
PlayerInfo[playerid][Cookies] < 20000) return SendClientMessage(playerid,  -1"{FF0000}ERROR : You dont have enough cookies to be V.I.P 2!");
            if(
PlayerInfo[playerid][LoggedIn] == && PlayerInfo[playerid][Vip] == 1)//logged is an example.Replace it with your login variable.
            
{
                
PlayerInfo[playerid][Vip] = 2;
                
PlayerInfo[playerid][Cookies] -= 20000;
                
GameTextForPlayer(playerid,"Vip Promoted"20003);
                
SendClientMessage(playerid, -1"{00FF40}You have received {FF0000}V.I.P {00FF40}Status 2");
                
SendClientMessage(playerid, -1"{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands");
                
SavePlayer(playerid);
            }
            else 
SendClientMessage(playerid, -1"{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 2");
            }
            if(
listitem == 2)
            {
            if(
PlayerInfo[playerid][Cookies] < 30000) return SendClientMessage(playerid,  -1"{FF0000}ERROR : You dont have enough cookies to be V.I.P 3!");
            if(
PlayerInfo[playerid][LoggedIn] == 1)//logged is an example.Replace it with your login variable.
            
{
                
PlayerInfo[playerid][Vip] = 3;
                
PlayerInfo[playerid][Cookies] -= 30000;
                
GameTextForPlayer(playerid,"Vip Promoted"20003);
                
SendClientMessage(playerid, -1"{00FF40}You have received {FF0000}V.I.P {00FF40}Status 3");
                
SendClientMessage(playerid, -1"{00FF40}Use /vcmds or /vcmd1 to see {FF0000}/VIPS {00FF40}Commands");
                
SavePlayer(playerid);
            }
            else 
SendClientMessage(playerid, -1"{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 3");
            }
        }
        return 
1;
    } 
With this, it will no longer require you to be vip 2 in order to be vip 3.
and now,i must buy V.I.P 1 Before buy V.I.P 2
or it will say
Код:
SendClientMessage(playerid, -1, "{FF0000}ERROR : {00FF40}You already received {FF0000}V.I.P {00FF40}Status 2");
Reply


Messages In This Thread
SHOP System problem - by KyNe - 11.01.2018, 06:39
Re: SHOP System problem - by iLearner - 11.01.2018, 07:11
Re: SHOP System problem - by KyNe - 11.01.2018, 07:35
Re: SHOP System problem - by Sew_Sumi - 11.01.2018, 08:16
Re: SHOP System problem - by AlexMSK - 11.01.2018, 08:19
Re: SHOP System problem - by KyNe - 11.01.2018, 08:20
Re: SHOP System problem - by AlexMSK - 11.01.2018, 08:22
Re: SHOP System problem - by Sew_Sumi - 11.01.2018, 08:22
Re: SHOP System problem - by AlexMSK - 11.01.2018, 08:24
Re: SHOP System problem - by KyNe - 11.01.2018, 08:30

Forum Jump:


Users browsing this thread: 1 Guest(s)