iFruit phone [standalone]

The all new iFruit 9ix is here! Now 3% thinner, 3% faster and a 30 hour queue.

This is the well known phone from Grand Theft Auto Online! I needed this phone for my upcoming resource, but i decided to share this one in advance!

image

What is so special about this phone?

It is an iFruit! Duhh… Everyone wants an iFruit nowadays. It is THE phone to have right now.

All jokes aside, it is a phone that every GTA player that is familiar with. Some of the current ‘apps’ of the phone like the internet, do not have a function yet, but the basic things like texts, emails, contacts and settings are there. Using the events that are listed below or you can find in the read me, can you utilise most of the phone’s options.

The events

Send a e-mail

To send an email you need to trigger the following event:

TriggerClientEvent("cl:ifruit:receiveEmail", player, sender, title, message, withFile) -- or TriggerEvent if you are triggering it client-sided (remove the player parameter)
  • player = The server id that receives the email (integer)

  • sender = The server id that sent the email (integer or string)

  • title = The title of the mail (string)

  • message = The message the mail contains (string)

  • withFile = If the email has a picture attached to it (boolean) (no images can be attached yet)

Example

TriggerClientEvent("cl:ifruit:receiveEmail", 2, 1, "This is a title", "This is the message", false)

Send a text

To send a text you need to trigger the following event:

TriggerClientEvent("cl:ifruit:receiveText", player, sender, title, message, hour, minute, avatar) -- or TriggerEvent if you are triggering it client-sided (remove the player parameter)
  • player = The server id that receives the text (integer)

  • sender = The server id that sent the text (integer or string)

  • title = The title of the text (string)

  • message = The message the text contains (string)

  • hour = The hour that the text was sent (integer). You can use GetClockHours() to get the current hour.

  • minute = The minute that the text was sent (integer). You can use GetClockMinutes() to get the current minutes.

  • avatar = The avatar of the certain person (string). Default is char_default, but you can use others, like those from the contacts (see contacts.lua).

Example

TriggerClientEvent("cl:ifruit:receiveText", 2, "Ms. Baker", "This is a title", "This is a message", GetClockHours(), GetClockMinutes(), "char_casino_manager")

Add the ‘Detonate Bomb’ contact

This part will add or remove the 'Detonate Bomb 'contact. This only adds or removes the contact for now.

TriggerClientEvent("cl:ifruit:setBombContact", player, addContact, eventName, isServerEvent) -- or TriggerEvent if you are triggering it client-sided (remove the player parameter)
  • player = The server id that gets or loses the ‘Detonate Bomb’ contact (integer)

  • addContact = If the contact gets added or removed (boolean)

  • eventName = The event that triggers when you ‘call’ the bomb (string)

  • isServerEvent = If the event is a server event (boolean)

Example

TriggerClientEvent("cl:ifruit:setBombContact", 1, true, "myClientEvent", false)

Invite to job

To add an job invite you need to trigger the following event:

TriggerClientEvent("cl:ifruit:invitePlayer", player, sender, title, description, colour, avatar, returnEvent, isServerEvent) -- or TriggerEvent if you are triggering it client-sided (remove the player parameter)
  • player = The server id that receives the job invite (integer)

  • sender = The server id that sent the job invite (integer or string)

  • title = The title of the job (string)

  • description = The description of the job (string). The heists all start with 'Heist : ’ and all the others start with 'Invite to ', but is not mandatory.

  • colour = The colour of the field (integer). See research.md for all the known colours.

  • avatar = The avatar of the certain person (string). Default is char_default, but you can use others, like those from the contacts (see contacts.lua).

  • returnEvent = The event that triggers when you accept the job invite (string)

  • isServerEvent = If the event is a server event (boolean)

Example

TriggerClientEvent("cl:ifruit:invitePlayer", 1, 2, "The Diamond Casino Heist", " Heist : Diamond Casino Heist", 1, "char_lester", "myClientEvent", false)

Activate the SecuroServ Hack system

To use the hack system, use the following event:

TriggerClientEvent("cl:ifruit:setSecuroServ", player, entity, radius, colour, useExtraBlip, sprite, returnEvent, isServerEvent) -- or TriggerEvent if you are triggering it client-sided (remove the player parameter)
  • player = The server id that receives the job invite (integer)

  • entity = The entity that the player needs to be close to in order to use the hack (entity). You can put 0 here to ignore the radius. The blips will also not be created.

  • radius = The radius that the person needs to be in (float)

  • colour = The colour of the blip (integer) (See Blips - Cfx.re Docs for the colour ids)

  • useExtraBlip = If a extra blip needs to be created for the entity (bool)

  • sprite = The blip icon (integer) (See Blips - Cfx.re Docs for the blip ids) (If useExtraBlip is false, you can put 0 here)

  • returnEvent = The event that gets triggered when the hack is completed (string)

  • isServerEvent = If the return event is a server event (bool)

Example

local modelHash = "prop_weed_01"
    
RequestModel(modelHash)

while not HasModelLoaded(modelHash) do
    Wait(1)
end

obj = CreateObject(GetHashKey(modelHash), -1004.0, 4963.12, 194.5, false, false, false) -- Weed plant at the cult fort

-- This is TriggerEvent, because the code above is client-sided
TriggerEvent("cl:ifruit:setSecuroServ", obj, 10.0, 1, true, 1, "myServerEvent", true)

I like the phone, but i want to give my own twist to it. Is that possible?

Yes! The entire code is open source, so you can make it your own!. It comes with a file called research.md, so you can change certain icons, apps and their purposes.

There are some things missing and I made them or I can improve the code of the resource

Good! If you want, you can make a pull request on my github repo, so we can make this resource like the one from GTA.

And yes I am not the best scripter, so there might be a better way to make this script (I am sorry)… If you want, you can make a pull request to improve the code.

Download

Download the resource here (version 1.2) or download it via Github. The latest version is always on github.

You told us that you needed this phone for another resource, what kind of resource will that be?

Some of you already know it, but i will give you a hint. Cheese and Crackers. Stay tuned!

Art by Rockstar Games

14 Likes

Is there any way to make it have an iphone skin
and is there anyway to get rid of the Jobs and Security apps

Good job Niels.

1 Like

Nice release Nailsy!

1 Like

Nice work buddy!

1 Like

Yes and yes! To get an iphone skin you need to A, Replace the texture or B, rewrite the scaleform and add the new textures. I would advise you to use option A, if you want to do it, since not everyone loves to work with adobe flash.

And then to replace / remove the icons. In main.lua you can find a table called icons. The pattern is as follows:

1-2-3
4-5-6
7-8-9

The numbers represent the index of the table. In the research.md are the other standard icons from gta. Replace the number of the icon with the icon that you want and dont forget to edit the headers in config.lua :slight_smile:

I hope you can make the best of it!!
Niels

woah h

1 Like

Yas! yas! yas! Good quality content :saluting_face:

1 Like

Good Job niels !

can’t wait for your casino script :slight_smile:

1 Like

Hii nice job bud, do you think you’ll make an esx version in the future or not? It whould be very nice👌

1 Like

Like bommeneefie said, I am working on a big project right now… I might make a esx and qb-core version when I am done with the project.

1 Like

Alright bud, let me know if you do it and we i will be able to download it!

Thanks have a great day!

1 Like

clean, very good release

1 Like

for what its worth , 90% use an gcphone or different , u might be able to sneak this in as a “illigal” phone for “stuff”

which makes a brilliant addition to other script you made sir :slight_smile:

Love your idea! And it shows that you can run this script next to another phone for a different purpose. I would love to see what you and others made from this script :yum: I made a new feature for the phone and the post will be updated in a bit (Done!). Get your hacking skills ready for some hacking :smirk_cat:

Version 1.1.2 is out now! There are some optimalizations regarding the textures that needed to be loaded. Thanks for the support and downloads :smiley_cat:. If there are any issues, you can report them here.

There are issues with the mail system. Anyone got some repro for me, as i can not reproduce any with that i got :frowning: . Oh and there is a new version that includes an update checker.