09.10.2013, 22:26
i tried more than 100 times to make this works and it didn't work perfect
i want to make number 1 do 2 things depends on what textdraw is showing now
i want to make number 1 do 2 things depends on what textdraw is showing now
pawn Code:
if(IsPlayerInRangeOfPoint(playerid,1.0,313.7608,-133.8826,999.6016)) //Ammunation
{
if(strval(text) == 1)
{
if(TextDrawShowForPlayer(playerid, AmmunationListBox1) && TextDrawShowForPlayer(playerid, AmmunationListBox2) && TextDrawShowForPlayer(playerid, AmmunationListBox3) && TextDrawShowForPlayer(playerid, AmmunationListTitle) && TextDrawShowForPlayer(playerid, AmmunationListEx) && TextDrawShowForPlayer(playerid, AmmunationListOptions))
{
TextDrawHideForPlayer(playerid,AmmunationListBox1);
TextDrawHideForPlayer(playerid,AmmunationListBox2);
TextDrawHideForPlayer(playerid,AmmunationListBox3);
TextDrawHideForPlayer(playerid,AmmunationListTitle);
TextDrawHideForPlayer(playerid,AmmunationListEx);
TextDrawHideForPlayer(playerid,AmmunationListOptions);
TextDrawShowForPlayer(playerid,AmmunationBox1);
TextDrawShowForPlayer(playerid,AmmunationBox2);
TextDrawShowForPlayer(playerid,AmmunationBox3);
TextDrawShowForPlayer(playerid,AmmunationTitle);
TextDrawShowForPlayer(playerid,AmmunationEx);
TextDrawShowForPlayer(playerid,AmmunationPrices);
TextDrawShowForPlayer(playerid,AmmunationList);
}
if(TextDrawShowForPlayer(playerid, AmmunationBox1) && TextDrawShowForPlayer(playerid, AmmunationBox2) && TextDrawShowForPlayer(playerid, AmmunationTitle) && TextDrawShowForPlayer(playerid, AmmunationEx) && TextDrawShowForPlayer(playerid, AmmunationPrices) && TextDrawShowForPlayer(playerid, AmmunationList) &&
TextDrawHideForPlayer(playerid,AmmunationListBox1) && TextDrawHideForPlayer(playerid,AmmunationListBox2) && TextDrawHideForPlayer(playerid,AmmunationListBox3) && TextDrawHideForPlayer(playerid,AmmunationListTitle) && TextDrawHideForPlayer(playerid,AmmunationListEx) && TextDrawHideForPlayer(playerid,AmmunationListOptions))
{
new playermoney = GetPlayerMoney(playerid);
if(playermoney < 5000) return !SendClientMessage(playerid,COLOR_WHITE,"{FF0000}Error: {FFFFFF}You don't have enough money to purchase this weapon!");
if(playermoney >= 5000) return !GivePlayerWeapon(playerid,24,100),!GivePlayerMoney(playerid,-5000),!SendClientMessage(playerid,COLOR_WHITE,"You have purchased {CC00FF}Desert Eagle {FFFFFF}for {09FF00}5000$");
}
}