enum Shops
{
shop_name[500],
shop_costmoney,
shop_costscore,
shop_reward[500],
shop_unlocked[MAX_PLAYERS]
}
new ServerShop[10][Shops]=
{
{"No more speeding control", 150000, 10 , "You have bought 'No More Speeding Control' you cannot be caught by speedtraps no more!", 0},
{"Instant Level 2", 100000, 0 , "You have bought 'Instant Level 2' and you are now Level 2 (120 score)", 1},
{"Instant Level 3", 200000, 0 , "You have bought 'Instant Level 3' and you are now Level 3 (180 score)", 0},
{"Save Deathpos", 500000, 50 , "You have bought 'Save Deathpos' and you will be auto spawned to your death pos when you!", 1},
{"10 Score", 25000, 0 , "You have bought 10 score points", 1},
{"50 Score", 100000, 0, "You have bought 50 score points", 1},
{"100 Score", 1750000, 0 , "You have bought 100 score points", 0},
{"Free Weather", 10000, 5 , "You have bought Free Weather and u can now use /fweather to chose ur weather!", 0},
{"Auto Armour", 50000, 7 , "You have bought 'Auto Armour' and u can now use the command: /auto armour once every 10 minuts", 1},
{"Auto Health", 750000, 12 , "You have bought 'Auto Armour' and u can now use the command: /autp health once every 10 minuts", 0}//removed the ',' here too
};
if ( !strcmp( "/servershop", cmdtext, true, 11 ) )
{
for(new i; i<sizeof ServerShop ; i++)
{
if(ServerShop[i][shop_unlocked][playerid] == 1)
{
format(shop1, sizeof(shop1), "%s{FFFF00}| {00FF00}-%s \n{FFFF00}| \t{00FF00}Already Bought\n",shop1,ServerShop[i][shop_name]);
sAvCount[playerid] = i;
}else
format(shop2, sizeof(shop2), "%s{FFFF00}| {FFFFFF}-%s \n{FFFF00}| \t{FFFFFF}%i Money{FFFF00}\n",shop2,ServerShop[i][shop_name], ServerShop[i][shop_costmoney]);
}
format(shop3, sizeof(shop3), "%s%s",shop1,shop2);
ShowPlayerDialog(playerid,72,DIALOG_STYLE_LIST,"{E4FF47}Server Shop", shop3 ,"Select", "Cancel");
return 1;
}
if(dialogid == 72)
{
if(!response) return 1;
new index = 0;
if(!isEven(listitem))
return index = listitem - 1;
if(ServerShop[index][shop_unlocked][playerid] == 0)
return SendClientMessage(playerid,COLOR_RED,"*You cannot buy shop items twice!");
else
return SendClientMessage(playerid,COLOR_SEXYGREEN,"*Proceeded");
}
enum Shops
{
shop_name[500],
shop_costmoney,
shop_costscore,
shop_reward[500],
shop_unlocked[MAX_PLAYERS]
}
new ServerShop[][Shops]=
{
{"No more speeding control", 150000, 10 , "You have bought 'No More Speeding Control' you cannot be caught by speedtraps no more!", {0, ... }},
{"Instant Level 2", 100000, 0 , "You have bought 'Instant Level 2' and you are now Level 2 (120 score)", {1, ... }},
{"Instant Level 3", 200000, 0 , "You have bought 'Instant Level 3' and you are now Level 3 (180 score)", {1, ... }},
{"Save Deathpos", 500000, 50 , "You have bought 'Save Deathpos' and you will be auto spawned to your death pos when you!", {1, ... }},
{"10 Score", 25000, 0 , "You have bought 10 score points", {1, ... }},
{"50 Score", 100000, 0, "You have bought 50 score points", {1, ... }},
{"100 Score", 1750000, 0 , "You have bought 100 score points", {0, ... }},
{"Free Weather", 10000, 5 , "You have bought Free Weather and u can now use /fweather to chose ur weather!", {0, ... }},
{"Auto Armour", 50000, 7 , "You have bought 'Auto Armour' and u can now use the command: /auto armour once every 10 minuts", {1, ... }},
{"Auto Health", 750000, 12 , "You have bought 'Auto Armour' and u can now use the command: /autp health once every 10 minuts", {0, ... }}//removed the ',' here too
};
simple... Next I made a little command that pops up a list dialog pawn Код:
that all the items that u have bought so far are displayed on top of the list in sexygreen then all the items that u haven't bought yet are under all the displayed sexygreen yet bought items in white... pawn Код:
|