Git Product home page Git Product logo

Comments (16)

T3rg0s avatar T3rg0s commented on August 30, 2024 1

lol, no, its for another things.

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024 1

Okay, I think it's better to change the "ingame introduction" for players, for example all new players has a phone number but they must buy a phone in first for using it :).

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Yes Good Idea ! Add a items phone in Market and if the player have bought a phone then the phone is fonctionnal :) And make same for the minimap u set the minimap on false ( i have the code if you want) and if the player have bought a gps then he see the minimap ;)

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

@ImagicTheCat, do you have you any mail/plateform for to contact you directly, for not pollute this project :)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

3rg00 if its my fault i delete my message if you want :(

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Ah ok ^^

@ImagicTheCat The code for desactivate the map:

Citizen.CreateThread(function()
        while true do
		Wait(1)
		if not displayRadar then
			DisplayRadar(false)
		end
	end
end)

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

Hm this one is tricky, to ensure stability of vRP I can't give this much control over actions as checking item or accepting use of the phone, but I can add a phone permission. This way you can add an item "Packed Phone", that when used will auto-delete itself and give the phone group to the player. If he respawn, you can just remove the phone group.
For the radar, you can create another resource to check if the player has the item you created, using the API, and show/hide the map at a specific interval. Or even add an item action "Enable/disable map", which is easier.

I will not make this a core feature because you spawn with an adult character, with clothes, in a city, so it's legit to spawn with a phone after all. But it's cool to make it possible.

You can contact me on the FiveM forum using private message (https://forum.fivem.net/u/Imagic/).

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

Yep it's not a bad idea finally... The group permission is a good way for to restrict any player for specific reason (for example we player get jailed). If you can show us an example of interaction with item, will be really nice :).

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

It's exactly the same as drinking a bottle, you just use vRP.addUserGroup instead.

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

Ups sorry for this stupid question... I will check this, thanks a lot :D, and pull if it can serve!

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

No problem, the API is here to give potential, try to play with it (you can define your phone item in cfg/items.lua to avoid some of the callback hell).
The phone permission is added, you can try it now.

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

I tried, it works perfectly ! I have just a little problem for to set restriction with identity, for hide phone number too :). Thanks a lot !

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

Hiding phone number ? Why ? For the business ?

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Thx ImagicTheCat, how to make for set a limit of items ex: i can only bough a 1 phone

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

Nop, for RP, because if player don't buy phone, this is normal that he can't show his number.
in "identity.lua"
if vRP.hasPermission(user_id, "player.phone") then
local content = lang.cityhall.menu.info({htmlEntities.encode(identity.name),htmlEntities.encode(identity.firstname),identity.age,identity.registration,identity.phone})
local choices = {}
choices[lang.cityhall.menu.title()] = {function()end, content}
vRP.buildMainMenu(player,choices)
else
local content = lang.cityhall.menu.info({htmlEntities.encode(identity.name),htmlEntities.encode(identity.firstname),identity.age,identity.registration,"No Phone number"})
local choices = {}
choices[lang.cityhall.menu.title()] = {function()end, content}
vRP.buildMainMenu(player,choices)
end

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

Hm, will look into this, but I think this is too much problems since it needs change in identity, business, and also the sms history.
See the phone number as a pre-reserved number, since it doesn't change if you buy a new phone, I will add the permission check before sending the SMS, but I don't think I will hide the number.

from vrp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.