31.10.2017, 11:52
Hello i've created a menu and its worked but the problem when i've press 1 its worked too but WHEN Press LMB The Textdraws is not destroyed Why?? Sorry I Dont know how to create a KEY_FIRE For Destroy it can you help me?!
I've tried in OnPlayerKeyStateChange Do that but its not worked.
PHP код:
public OnPlayerText(playerid, text[])
{
if(InMenu[playerid] == 1)
{
if(strval(text) == 1)
{
TextDrawHideForPlayer(playerid, Textdraw66);
TextDrawHideForPlayer(playerid, Textdraw67);
TextDrawHideForPlayer(playerid, Textdraw68);
TextDrawHideForPlayer(playerid, Textdraw69);
TextDrawHideForPlayer(playerid, Textdraw70);
TextDrawHideForPlayer(playerid, Textdraw71);
TextDrawHideForPlayer(playerid, Textdraw72);
TextDrawHideForPlayer(playerid, Textdraw73);
TextDrawHideForPlayer(playerid, Textdraw74);
TextDrawHideForPlayer(playerid, Textdraw75);
TextDrawHideForPlayer(playerid, Textdraw76);
TextDrawHideForPlayer(playerid, Textdraw77);
TextDrawHideForPlayer(playerid, Textdraw78);
TextDrawHideForPlayer(playerid, Textdraw79);
TextDrawHideForPlayer(playerid, Textdraw80);
TextDrawHideForPlayer(playerid, Textdraw81);
TextDrawHideForPlayer(playerid, Textdraw82);
TextDrawHideForPlayer(playerid, Textdraw83);
TextDrawHideForPlayer(playerid, Textdraw84);
TextDrawHideForPlayer(playerid, Textdraw85);
TextDrawHideForPlayer(playerid, Textdraw86);
TextDrawHideForPlayer(playerid, Textdraw87);
TextDrawHideForPlayer(playerid, Textdraw88);
TextDrawHideForPlayer(playerid, Textdraw89);
TextDrawHideForPlayer(playerid, Textdraw90);
TextDrawHideForPlayer(playerid, Textdraw91);
TextDrawHideForPlayer(playerid, Textdraw92);
TextDrawHideForPlayer(playerid, Textdraw93);
TextDrawHideForPlayer(playerid, Textdraw94);
TextDrawHideForPlayer(playerid, Textdraw95);
TextDrawHideForPlayer(playerid, Textdraw96);
TextDrawHideForPlayer(playerid, Textdraw97);
TextDrawHideForPlayer(playerid, Textdraw98);
TextDrawHideForPlayer(playerid, Textdraw99);
TextDrawHideForPlayer(playerid, Textdraw100);
TextDrawHideForPlayer(playerid, Textdraw101);
TextDrawHideForPlayer(playerid, Textdraw102);
TextDrawHideForPlayer(playerid, Textdraw103);
TextDrawHideForPlayer(playerid, Textdraw104);
TextDrawHideForPlayer(playerid, Textdraw105);
TextDrawShowForPlayer(playerid, Textdraw106);
TextDrawShowForPlayer(playerid, Textdraw107);
TextDrawShowForPlayer(playerid, Textdraw108);
TextDrawShowForPlayer(playerid, Textdraw109);
TextDrawShowForPlayer(playerid, Textdraw110);
TextDrawShowForPlayer(playerid, Textdraw111);
TextDrawShowForPlayer(playerid, Textdraw112);
TextDrawShowForPlayer(playerid, Textdraw113);
TextDrawShowForPlayer(playerid, Textdraw114);
TextDrawShowForPlayer(playerid, Textdraw115);
TextDrawShowForPlayer(playerid, Textdraw116);
TextDrawShowForPlayer(playerid, Textdraw117);
TextDrawShowForPlayer(playerid, Textdraw118);
TextDrawShowForPlayer(playerid, Textdraw119);
TextDrawShowForPlayer(playerid, Textdraw120);
TextDrawShowForPlayer(playerid, Textdraw121);
TextDrawShowForPlayer(playerid, Textdraw122);
TextDrawShowForPlayer(playerid, Textdraw123);
TextDrawShowForPlayer(playerid, Textdraw124);
TextDrawShowForPlayer(playerid, Textdraw125);
TextDrawShowForPlayer(playerid, Textdraw126);
TextDrawShowForPlayer(playerid, Textdraw127);
TextDrawShowForPlayer(playerid, Textdraw128);
TextDrawShowForPlayer(playerid, Textdraw129);
TextDrawShowForPlayer(playerid, Textdraw130);
TextDrawShowForPlayer(playerid, Textdraw131);
TextDrawShowForPlayer(playerid, Textdraw132);
TextDrawShowForPlayer(playerid, Textdraw133);
TextDrawShowForPlayer(playerid, Textdraw134);
TextDrawShowForPlayer(playerid, Textdraw135);
TextDrawShowForPlayer(playerid, Textdraw136);
TextDrawShowForPlayer(playerid, Textdraw137);
TextDrawShowForPlayer(playerid, Textdraw138);
TextDrawShowForPlayer(playerid, Textdraw139);
InMenu[playerid] =0;
return 0;
}
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
if (InMenu[playerid] == 1)
{
TextDrawHideForPlayer(playerid, Textdraw98);
}
}
return 1;
}