c4striker Posted June 11, 2024 Posted June 11, 2024 How can I add 20 seconds before I can send a message again in this code? - script map -1,{ OnWhisperglobal: if( getgroupid() < 5 ) end; announce ""+strcharinfo(0)+": "+@whispervar0$,bc_map; end; } - script global -1,{ OnWhisperglobal: if( getgroupid() < 5 ) end; announce ""+strcharinfo(0)+": "+@whispervar0$,bc_all; end; } Quote
0 Winterfox Posted June 11, 2024 Posted June 11, 2024 - script GLOBAL -1,{ OnWhisperglobal: if(getgroupid() < 5 || MESSAGE_COOLDOWN > gettimetick(2)) end; announce(strcharinfo(0) + ": " + @whispervar0$, bc_all); MESSAGE_COOLDOWN = gettimetick(2) + 20; } 1 Quote
0 c4striker Posted June 12, 2024 Author Posted June 12, 2024 2 hours ago, Winterfox said: - script GLOBAL -1,{ OnWhisperglobal: if(getgroupid() < 5 || MESSAGE_COOLDOWN > gettimetick(2)) end; announce(strcharinfo(0) + ": " + @whispervar0$, bc_all); MESSAGE_COOLDOWN = gettimetick(2) + 20; } Thanks guy, it's working. Quote
Question
c4striker
How can I add 20 seconds before I can send a message again in this code?
- script map -1,{ OnWhisperglobal: if( getgroupid() < 5 ) end; announce ""+strcharinfo(0)+": "+@whispervar0$,bc_map; end; } - script global -1,{ OnWhisperglobal: if( getgroupid() < 5 ) end; announce ""+strcharinfo(0)+": "+@whispervar0$,bc_all; end; }
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.