How to make..
#1

How to i can make If someone pressed LMB OR The KEY_FIRE The textdraws removed?


PHP код:
CMD:cmds(playeridparams[])
{
      
InMenu[playerid] = 1;
      {
      
TextDrawShowForPlayer(playeridTextdraw66);
      
TextDrawShowForPlayer(playeridTextdraw67);
      
TextDrawShowForPlayer(playeridTextdraw68);
      
TextDrawShowForPlayer(playeridTextdraw69);
      
TextDrawShowForPlayer(playeridTextdraw70);
      
TextDrawShowForPlayer(playeridTextdraw71);
      
TextDrawShowForPlayer(playeridTextdraw72);
      
TextDrawShowForPlayer(playeridTextdraw73);
      
TextDrawShowForPlayer(playeridTextdraw74);
      
TextDrawShowForPlayer(playeridTextdraw75);
      
TextDrawShowForPlayer(playeridTextdraw76);
      
TextDrawShowForPlayer(playeridTextdraw77);
      
TextDrawShowForPlayer(playeridTextdraw78);
      
TextDrawShowForPlayer(playeridTextdraw79);
      
TextDrawShowForPlayer(playeridTextdraw80);
      
TextDrawShowForPlayer(playeridTextdraw81);
      
TextDrawShowForPlayer(playeridTextdraw82);
      
TextDrawShowForPlayer(playeridTextdraw83);
      
TextDrawShowForPlayer(playeridTextdraw84);
      
TextDrawShowForPlayer(playeridTextdraw85);
      
TextDrawShowForPlayer(playeridTextdraw86);
      
TextDrawShowForPlayer(playeridTextdraw87);
      
TextDrawShowForPlayer(playeridTextdraw88);
      
TextDrawShowForPlayer(playeridTextdraw89);
      
TextDrawShowForPlayer(playeridTextdraw90);
      
TextDrawShowForPlayer(playeridTextdraw91);
      
TextDrawShowForPlayer(playeridTextdraw92);
      
TextDrawShowForPlayer(playeridTextdraw93);
      
TextDrawShowForPlayer(playeridTextdraw94);
      
TextDrawShowForPlayer(playeridTextdraw95);
      
TextDrawShowForPlayer(playeridTextdraw96);
      
TextDrawShowForPlayer(playeridTextdraw97);
      
TextDrawShowForPlayer(playeridTextdraw98);
      
TextDrawShowForPlayer(playeridTextdraw99);
      
TextDrawShowForPlayer(playeridTextdraw100);
      
TextDrawShowForPlayer(playeridTextdraw101);
      
TextDrawShowForPlayer(playeridTextdraw102);
      
TextDrawShowForPlayer(playeridTextdraw103);
      
TextDrawShowForPlayer(playeridTextdraw104);
      
TextDrawShowForPlayer(playeridTextdraw105);
      }
      return 
1;

Reply
#2

I am not really sure, but you can try this one?

Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
    if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
    your things...
    return 1;
}
https://sampwiki.blast.hk/wiki/Function:...KeyStateChange
Reply
#3

Quote:
Originally Posted by Lokii
Посмотреть сообщение
PHP код:
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
PRESSED(KEY_FIRE))
    {
        
//code
    
}
    return 
1;

You posted EXACTLY the same code as the guy above you.. Well done.
Reply
#4

Look here's i need to make if someone Pressed LMB OR KEY_FIRE Textdraws removing i've trying your code its worked But i need for this too how to do it?

PHP код:
public OnPlayerText(playeridtext[])
{
    if(
InMenu[playerid] == 1)
    {
       if(
strval(text) == 1)
       {
          
TextDrawHideForPlayer(playeridTextdraw66);
          
TextDrawHideForPlayer(playeridTextdraw67);
          
TextDrawHideForPlayer(playeridTextdraw68);
          
TextDrawHideForPlayer(playeridTextdraw69);
          
TextDrawHideForPlayer(playeridTextdraw70);
          
TextDrawHideForPlayer(playeridTextdraw71);
          
TextDrawHideForPlayer(playeridTextdraw72);
          
TextDrawHideForPlayer(playeridTextdraw73);
          
TextDrawHideForPlayer(playeridTextdraw74);
          
TextDrawHideForPlayer(playeridTextdraw75);
          
TextDrawHideForPlayer(playeridTextdraw76);
          
TextDrawHideForPlayer(playeridTextdraw77);
          
TextDrawHideForPlayer(playeridTextdraw78);
          
TextDrawHideForPlayer(playeridTextdraw79);
          
TextDrawHideForPlayer(playeridTextdraw80);
          
TextDrawHideForPlayer(playeridTextdraw81);
          
TextDrawHideForPlayer(playeridTextdraw82);
          
TextDrawHideForPlayer(playeridTextdraw83);
          
TextDrawHideForPlayer(playeridTextdraw84);
          
TextDrawHideForPlayer(playeridTextdraw85);
          
TextDrawHideForPlayer(playeridTextdraw86);
          
TextDrawHideForPlayer(playeridTextdraw87);
          
TextDrawHideForPlayer(playeridTextdraw88);
          
TextDrawHideForPlayer(playeridTextdraw89);
          
TextDrawHideForPlayer(playeridTextdraw90);
          
TextDrawHideForPlayer(playeridTextdraw91);
          
TextDrawHideForPlayer(playeridTextdraw92);
          
TextDrawHideForPlayer(playeridTextdraw93);
          
TextDrawHideForPlayer(playeridTextdraw94);
          
TextDrawHideForPlayer(playeridTextdraw95);
          
TextDrawHideForPlayer(playeridTextdraw96);
          
TextDrawHideForPlayer(playeridTextdraw97);
          
TextDrawHideForPlayer(playeridTextdraw98);
          
TextDrawHideForPlayer(playeridTextdraw99);
          
TextDrawHideForPlayer(playeridTextdraw100);
          
TextDrawHideForPlayer(playeridTextdraw101);
          
TextDrawHideForPlayer(playeridTextdraw102);
          
TextDrawHideForPlayer(playeridTextdraw103);
          
TextDrawHideForPlayer(playeridTextdraw104);
          
TextDrawHideForPlayer(playeridTextdraw105);
          
TextDrawShowForPlayer(playeridTextdraw106);
          
TextDrawShowForPlayer(playeridTextdraw107);
          
TextDrawShowForPlayer(playeridTextdraw108);
          
TextDrawShowForPlayer(playeridTextdraw109);
          
TextDrawShowForPlayer(playeridTextdraw110);
          
TextDrawShowForPlayer(playeridTextdraw111);
          
TextDrawShowForPlayer(playeridTextdraw112);
          
TextDrawShowForPlayer(playeridTextdraw113);
          
TextDrawShowForPlayer(playeridTextdraw114);
          
TextDrawShowForPlayer(playeridTextdraw115);
          
TextDrawShowForPlayer(playeridTextdraw116);
          
TextDrawShowForPlayer(playeridTextdraw117);
          
TextDrawShowForPlayer(playeridTextdraw118);
          
TextDrawShowForPlayer(playeridTextdraw119);
          
TextDrawShowForPlayer(playeridTextdraw120);
          
TextDrawShowForPlayer(playeridTextdraw121);
          
TextDrawShowForPlayer(playeridTextdraw122);
          
TextDrawShowForPlayer(playeridTextdraw123);
          
TextDrawShowForPlayer(playeridTextdraw124);
          
TextDrawShowForPlayer(playeridTextdraw125);
          
TextDrawShowForPlayer(playeridTextdraw126);
          
TextDrawShowForPlayer(playeridTextdraw127);
          
TextDrawShowForPlayer(playeridTextdraw128);
          
TextDrawShowForPlayer(playeridTextdraw129);
          
TextDrawShowForPlayer(playeridTextdraw130);
          
TextDrawShowForPlayer(playeridTextdraw131);
          
TextDrawShowForPlayer(playeridTextdraw132);
          
TextDrawShowForPlayer(playeridTextdraw133);
          
TextDrawShowForPlayer(playeridTextdraw134);
          
TextDrawShowForPlayer(playeridTextdraw135);
          
TextDrawShowForPlayer(playeridTextdraw136);
          
TextDrawShowForPlayer(playeridTextdraw137);
          
TextDrawShowForPlayer(playeridTextdraw138);
          
TextDrawShowForPlayer(playeridTextdraw139);
          
InMenu[playerid] =0;
          return 
0;
       }
       if(
InMenu[playerid] == 1)
       {
          if(
strval(text) == 2)
       {
              
TextDrawHideForPlayer(playeridTextdraw66);
              
TextDrawHideForPlayer(playeridTextdraw67);
              
TextDrawHideForPlayer(playeridTextdraw68);
              
TextDrawHideForPlayer(playeridTextdraw69);
              
TextDrawHideForPlayer(playeridTextdraw70);
              
TextDrawHideForPlayer(playeridTextdraw71);
              
TextDrawHideForPlayer(playeridTextdraw72);
              
TextDrawHideForPlayer(playeridTextdraw73);
              
TextDrawHideForPlayer(playeridTextdraw74);
              
TextDrawHideForPlayer(playeridTextdraw75);
              
TextDrawHideForPlayer(playeridTextdraw76);
              
TextDrawHideForPlayer(playeridTextdraw77);
              
TextDrawHideForPlayer(playeridTextdraw78);
              
TextDrawHideForPlayer(playeridTextdraw79);
              
TextDrawHideForPlayer(playeridTextdraw80);
              
TextDrawHideForPlayer(playeridTextdraw81);
              
TextDrawHideForPlayer(playeridTextdraw82);
              
TextDrawHideForPlayer(playeridTextdraw83);
              
TextDrawHideForPlayer(playeridTextdraw84);
              
TextDrawHideForPlayer(playeridTextdraw85);
              
TextDrawHideForPlayer(playeridTextdraw86);
              
TextDrawHideForPlayer(playeridTextdraw87);
              
TextDrawHideForPlayer(playeridTextdraw88);
              
TextDrawHideForPlayer(playeridTextdraw89);
              
TextDrawHideForPlayer(playeridTextdraw90);
              
TextDrawHideForPlayer(playeridTextdraw91);
              
TextDrawHideForPlayer(playeridTextdraw92);
              
TextDrawHideForPlayer(playeridTextdraw93);
              
TextDrawHideForPlayer(playeridTextdraw94);
              
TextDrawHideForPlayer(playeridTextdraw95);
              
TextDrawHideForPlayer(playeridTextdraw96);
              
TextDrawHideForPlayer(playeridTextdraw97);
              
TextDrawHideForPlayer(playeridTextdraw98);
              
TextDrawHideForPlayer(playeridTextdraw99);
              
TextDrawHideForPlayer(playeridTextdraw100);
              
TextDrawHideForPlayer(playeridTextdraw101);
              
TextDrawHideForPlayer(playeridTextdraw102);
              
TextDrawHideForPlayer(playeridTextdraw103);
              
TextDrawHideForPlayer(playeridTextdraw104);
              
TextDrawHideForPlayer(playeridTextdraw105);
              
              
TextDrawShowForPlayer(playeridTextdraw140);
              
TextDrawShowForPlayer(playeridTextdraw141);
              
TextDrawShowForPlayer(playeridTextdraw142);
              
TextDrawShowForPlayer(playeridTextdraw143);
              
TextDrawShowForPlayer(playeridTextdraw144);
              
TextDrawShowForPlayer(playeridTextdraw145);
              
TextDrawShowForPlayer(playeridTextdraw146);
              
TextDrawShowForPlayer(playeridTextdraw147);
              
TextDrawShowForPlayer(playeridTextdraw148);
              
TextDrawShowForPlayer(playeridTextdraw150);
              
TextDrawShowForPlayer(playeridTextdraw149);
              
TextDrawShowForPlayer(playeridTextdraw151);
              
TextDrawShowForPlayer(playeridTextdraw152);
              
TextDrawShowForPlayer(playeridTextdraw153);
              
TextDrawShowForPlayer(playeridTextdraw154);
              
TextDrawShowForPlayer(playeridTextdraw155);
              
TextDrawShowForPlayer(playeridTextdraw156);
              
TextDrawShowForPlayer(playeridTextdraw157);
              
TextDrawShowForPlayer(playeridTextdraw158);
              
TextDrawShowForPlayer(playeridTextdraw159);
              
TextDrawShowForPlayer(playeridTextdraw160);
              
TextDrawShowForPlayer(playeridTextdraw161);
              
InMenu[playerid] = 0;
              return 
0;
       } 
Reply
#5

WTF SOMEONE HELP ME
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)