Ipquarx

Untitled

Oct 14th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. function Player::emote(%player, %data, %skipSpam)
  2. {
  3.     if(!isObject(%data))
  4.         return;
  5.    
  6.     if(!%skipSpam)
  7.     {
  8.         if(getSimTime() - %player.lastVoiceTime < 1000)
  9.             %player.voiceCount++;
  10.         else if(getSimTime() - %player.lastVoiceTime > 10000)
  11.             %player.voiceCount = 0;
  12.        
  13.         if(%player.voiceCount > 5)
  14.             return;
  15.        
  16.         %player.lastVoiceTime = getSimTime();
  17.     }
  18.    
  19.     //Code to do emote here
  20. }
Advertisement
Add Comment
Please, Sign In to add comment