23.10.2011, 16:24
I have two Dialogs One for the Electronics store to purchase various phones, The other for Service, Ulimited everything service, or prepaid service. under where it says "Case 0, Case 1, ect....." Can someone let me know what i would put to help store the variables, to let the system know the player purchased a phone, and service or minutes?
Notes: I use Y_INI
Enum
Dialogs
Notes: I use Y_INI
Enum
pawn Код:
enum pInfo
{
pPass,
pLevel,
pExp,
pCash,
pSex,
pAge,
pSkin,
pLeader,
pRank,
pTeam,
pMember,
pAdmin,
pVip,
pMuted,
pTut,
pMuteTime,// Bugged At the Moment
pLocked,
pHasAPhone,
pPhoneType,
pPhoneService,
pNumber,
pKills,
pDeaths,
}
pawn Код:
case DIALOG_ESTORE:
{
if( !response ) return 0;
if( response )
{
switch( listitem )
{
case 0:// HTC Evo Phone
{
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, 0xFFFFFF, "Congratulations you just purchased a HTC Evo with 4G internet speed. /service to activate your new phone.");
//Do something here to save the players data saying the player now has phone type 1
}
case 1: // Iphone
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -5);
SendClientMessage(playerid, 0xFFFFFF, "Congratulations you just purchased a Iphone with 4G internet speed. /service to activate your new phone.");
//Do something here to save the players data saying the player now has phone type 2
}
case 2: // Samsung Galaxy SII
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -5);
SendClientMessage(playerid, 0xFFFFFF, "Congratulations you just purchased a Samsung Galaxy SII with 3G internet speed. /service to activate your new phone.");
//Do something here to save the players data saying the player now has phone type 3
}
case 3: // Prepaid
{
if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -5);
SendClientMessage(playerid, 0xFFFFFF, "Congratulations you just purchased a Prepid Rumor 2. /service to buy Minutes.");
//Do something here to save the players data saying the player now has phone type 4
}
}
}
}
case DIALOG_SERVICE:
{
if( !response ) return 0;
if( response )
{
switch( listitem )
{
case 0:// Sprint Contract
{
if(GetPlayerMoney(playerid) < 85) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -85);
SendClientMessage(playerid, 0xFFFFFF, "You just signed a contract with Sprint for your Unlimited plan.");
SendClientMessage(playerid, 0xFFFFFF, "85.00$ Will be deducted from your account every month(payday).");
SendClientMessage(playerid, 0xFFFFFF, "Failure to pay your bill will result in disconnection, and reconnection fees.");
//Do something here to save the players data saying the player now has service type 1
}
case 1: // AT&T Contract
{
if(GetPlayerMoney(playerid) < 90) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -90);
SendClientMessage(playerid, 0xFFFFFF, "You just signed a contract with AT&T for your Unlimited plan.");
SendClientMessage(playerid, 0xFFFFFF, "90.00$ Will be deducted from your account every month(payday).");
SendClientMessage(playerid, 0xFFFFFF, "Failure to pay your bill will result in disconnection, and reconnection fees.");
//Do something here to save the players data saying the player now has service type 2
}
case 2: // Boost Mobile Contract
{
if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -50);
SendClientMessage(playerid, 0xFFFFFF, "You just signed a contract with BoostMobile for your Unlimited plan.");
SendClientMessage(playerid, 0xFFFFFF, "50.00$ Will be deducted from your account every month(payday).");
SendClientMessage(playerid, 0xFFFFFF, "Failure to pay your bill will result in disconnection, and reconnection fees.");
//Do something here to save the players data saying the player now has service type 3
}
case 3: // Prepaid Minutes
{
if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
GivePlayerMoney(playerid, -20);
SendClientMessage(playerid, 0xFFFFFF, "You just purchased some minutes for your prepaid phone.");
SendClientMessage(playerid, 0xFFFFFF, "If you run out of minutes, you wont recieve any calls or text messages untill replenished.");
//Do something here to save the players data saying the player now has service type 4
}
}
}
}