Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- © 2012 CloudSixteen.com do not share, re-distribute or modify
- without permission of its author ([email protected]).
- --]]
- local PLUGIN = PLUGIN;
- -- Called when a player's typing display has started.
- function PLUGIN:PlayerStartTypingDisplay(player, code)
- if (player:GetFaction() == FACTION_MPF or player:GetModel() == "models/jim_combine/police.mdl" and !player:IsNoClipping()) then
- if (code == "n" or code == "y" or code == "w" or code == "r") then
- if (!player.typingBeep) then
- player.typingBeep = true;
- player:EmitSound("ambient/levels/prison/radio_random"..math.random(1, 15)..".wav");
- end;
- end;
- end;
- elseif (player:GetFaction() == FACTION_OTA) then
- if (code == "n" or code == "y" or code == "w" or code == "r") then
- if (!player.typingBeep) then
- player.typingBeep = true;
- player:EmitSound("common/on"..math.random(1, 6)..".mp3");
- end;
- end;
- end;
- end;
- -- Called when a player's typing display has finished.
- function PLUGIN:PlayerFinishTypingDisplay(player, textTyped)
- if (player:GetFaction() == FACTION_MPF and textTyped) then
- if (player.typingBeep) then
- if(math.random(1, 2) == 1) then
- player:EmitSound("ambient/levels/prison/radio_random7.wav");
- else
- player:EmitSound("ambient/levels/prison/radio_random8.wav");
- end;
- end;
- elseif (player:GetFaction() == FACTION_OTA) then
- if (player.typingBeep) then
- player:EmitSound("common/off"..math.random(1, 9)..".mp3");
- end;
- end;
- player.typingBeep = nil;
- end;
Advertisement
Add Comment
Please, Sign In to add comment