25.10.2012, 08:00
Well, I made a /buy command to make it for different stores. I made it so that if you were at IsAt247(playerid) || IsAtElecShop(playerid) || IsAtHardShop(playerid)
However, Whenever I go to the location of any of those, It says You are not in a Store! I don't know why, Any thoughts?
However, Whenever I go to the location of any of those, It says You are not in a Store! I don't know why, Any thoughts?
pawn Code:
CMD:buy(playerid, params[])
{
if(!IsAt247(playerid) || !IsAtElecShop(playerid) || !IsAtHardShop(playerid))
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in a Store!");
return 1;
}
if(IsAt247(playerid))
{
/*if(Showing[playerid] == 1)
{
Showing[playerid] = 0;
for(new i = 0; i < 39; i++)
{
TextDrawHideForPlayer(playerid, Textdraw[i]);
TogglePlayerControllable(playerid,1);
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "The /buy menu may have some bugs. If you find any report them at www.ug-gaming.tk/forums");
Showing[playerid] = 1;
SelectTextDraw(playerid, 0xFF4040AA);
for(new i = 0; i < 39; i++)
{
TextDrawShowForPlayer(playerid, Textdraw[i]);
TogglePlayerControllable(playerid,0);
}
}*/
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
ShowPlayerDialog(playerid, STOREMENU, DIALOG_STYLE_LIST, "24/7", "Phone Book $4000\nDice $400\nCondom $40\nSpraycan $160\nRope $800\nCigar $40\nSprunk $8\nCheckbook $400\nBag $5000\nPapers $400", "Buy", "Cancel");
}
else
{
ShowPlayerDialog(playerid, STOREMENU, DIALOG_STYLE_LIST, "24/7", "Cell Phone $500\nDice $500\nCondom $50\nSpraycan $200\nRope $1000\nCigar $50\nSprunk $10\nCheckbook $500\nBag $6000\nPapers $500", "Buy", "Cancel");
}
}
if(IsAtElecShop(playerid))
{
if(PlayerInfo[playerid][pDonateRank] >= 1)
{
ShowPlayerDialog(playerid, STOREMENU2, DIALOG_STYLE_LIST, "Electronic's Shop", "Cell Phone $400\nCD Player $40\nVehicle Lock $4000\nPortable Radio $40000\nCamera $160", "Buy", "Cancel");
}
else
{
ShowPlayerDialog(playerid, STOREMENU2, DIALOG_STYLE_LIST, "Electronic's Shop", "Cell Phone $500\nCD Player $50\nVehicle Lock $5000\nPortable Radio $50000\nCamera $200", "Buy", "Cancel");
}
}
return 1;
}