16.08.2011, 22:57
Hello!
I've tried to made a command which send a message if u aren't in a dm and send an other message if u are in a dm. Its compiled but doesn't work... It sends the first message every time. What is the problem, what should i do?
Here is the code:
I've tried to made a command which send a message if u aren't in a dm and send an other message if u are in a dm. Its compiled but doesn't work... It sends the first message every time. What is the problem, what should i do?
Here is the code:
Код:
if(strcmp("/dm", cmdtext, true, 10) == 0) { indm[playerid] = 1; return 1; } if(strcmp("/exitdm", cmdtext, true, 10) == 0) { indm[playerid] = 0; return 1; } if(strcmp("/test", cmdtext, true, 10) == 0) { if(indm[playerid] == 1) { SendClientMessage(playerid, red, "u're in dm"); } else { SendClientMessage(playerid, yellow, "u aren't in dm"); return 1; } }