Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Native;
- using System;
- using System.Windows.Forms;
- namespace HidePhoneDuringCall
- {
- public class Main : Script
- {
- bool IsCalling;
- bool HidePhone = false;
- int Time = 10000;
- public Main()
- {
- Tick += OnTick;
- }
- void OnTick(object sender, EventArgs e)
- {
- if (Function.Call<bool>(Hash.IS_MOBILE_PHONE_CALL_ONGOING))
- {
- IsCalling = true;
- }
- else
- {
- IsCalling = false;
- }
- if (IsCalling)
- {
- if (!HidePhone)
- {
- if (Function.Call<bool>(Hash.CAN_PHONE_BE_SEEN_ON_SCREEN))
- {
- Script.Wait(Time);
- Function.Call(Hash.SET_MOBILE_PHONE_SCALE, 0.0f);
- HidePhone = true;
- }
- }
- }
- else
- {
- if (HidePhone)
- {
- HidePhone = false;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement