OnPlayerText
#1

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

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$");

            }
        }
Reply
#2

Edit: never mind
Reply
#3

somebody help please
Reply
#4

What ?
TextDrawShowForPlayer doesn't return anything
Reply
#5

Quote:
Originally Posted by park4bmx
View Post
What ?
TextDrawShowForPlayer doesn't return anything
so how to do this ?
Reply
#6

create a variable/array, each time you show the textdraw set the variable to 1 whe u hide it set it to 0

and that will be your check
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)