SA-MP Forums Archive
HELP: How can i make bool like function??? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HELP: How can i make bool like function??? (/showthread.php?tid=318254)



HELP: How can i make bool like function??? - vakhtang - 14.02.2012

So I made HasPlayerAcceptedRace[MAX_PLAYERS]; and then i used is as bool gave true or false bu when i force it to change it doesnt!!!? here is code:
pawn Код:
if(dialogid == 4133)
    {
        if (!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You Have Canceled The Invitation!");
        HasPlayerAcceptedRace[playerid] = 1;
        return 1;
    }



Re: HELP: How can i make bool like function??? - Cameltoe - 14.02.2012

bool:HasPlayerAcceptedRace[MAX_PLAYERS];

HasPlayerAcceptedRace[playerid] = false;
HasPlayerAcceptedRace[playerid] = true;


Re: HELP: How can i make bool like function??? - vakhtang - 14.02.2012

Is my dialog response correct


Re: HELP: How can i make bool like function??? - Littlehelper - 14.02.2012

Hello,
Quote:
Originally Posted by vakhtang
Посмотреть сообщение
Is my dialog response correct
Код:
if(dialogid == 4133)
    {
        if (!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You Have Canceled The Invitation!");
        }
        else
        {
        HasPlayerAcceptedRace[playerid] = 1;
        return 1;
    }
I think this is the right response.


Re: HELP: How can i make bool like function??? - vakhtang - 14.02.2012

Thanks guys but somehow when i response by clicking the first button HasPlayerAcceptedRace[playerid] = true; doesnt work I dont know why this is happening can bool be changed?!


Re: HELP: How can i make bool like function??? - Littlehelper - 14.02.2012

Hello,
Explain what you mean.


Re: HELP: How can i make bool like function??? - vakhtang - 14.02.2012

When player presses button 1 HasPlayerAcceptedRace[playerid] should become true but it somehow doesnt it stays false as in ongamemodeinit()


Re: HELP: How can i make bool like function??? - Littlehelper - 14.02.2012

Hello,
Post this with other new's
pawn Код:
new bool:HasPlayerAcceptedRace[MAX_PLAYERS] = false;
And
OnDialogRensponse
pawn Код:
if(dialogid == 4133)
    {
        if (!response) return HasPlayerAcceptedRace[playerid] == true);
        }
        else
        {
        HasPlayerAcceptedRace[playerid] == False;
        return 1;
    }



Re: HELP: How can i make bool like function??? - vakhtang - 14.02.2012

HERE IS THE WHOLE FU*** CODE NOT WORKING AS SUSPECTED!!!!!!!!!!! http://pastebin.com/vjMaYtES


Re: HELP: How can i make bool like function??? - vakhtang - 14.02.2012

Xelp me I need Xelp!!!!!