how would i do this?
#7

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
corrected:
pawn Код:
new twice = 0; // Creates a variable with the value 0.
     if(cmdtext == "/rules") { //checks we typed /rules
          if(twice == 0) { //if our variable (twice) is still 0, then it adds one (so twice is 1 now.)
          twice++;
          } else { //Now, we've got the twice 1, and typed /rules, so it returns that message:
          twice = 0; //sets twice 0 to repeat the code.
          return SendClientMessage(playerid,red,"You've typed /rules twice!");//sends this message, and it doesnt perform /rules.
     }
}
Yours will not work, you create a global varible 'twice' you need a player varible.
Reply


Messages In This Thread
how would i do this? - by CrazyBlob - 14.04.2011, 18:00
Re: how would i do this? - by Seven_of_Nine - 14.04.2011, 18:07
Re: how would i do this? - by CrazyBlob - 14.04.2011, 18:14
Re: how would i do this? - by Kyle - 14.04.2011, 18:17
Re: how would i do this? - by CrazyBlob - 14.04.2011, 18:19
Re: how would i do this? - by Seven_of_Nine - 14.04.2011, 18:20
Re: how would i do this? - by Kyle - 14.04.2011, 18:20
Re: how would i do this? - by Seven_of_Nine - 14.04.2011, 18:22

Forum Jump:


Users browsing this thread: 3 Guest(s)