Jump to content

MTA Paradise - a few questions


MarxVen

Recommended Posts

Hi. I've a few problems with mta paradise.

1. How to make colorful nicknames for factions?

2. How to make a gates for factions?

3. How to showed the nick of the character's head?

4. How to make a commands /repair for roadside assistance, /sethealth for medics, /freeze, /unfreeze, /mute, /unmute, /kick and /jail, /unjail for police? :)

Sorry for bad english.

Link to comment

How to check if a player is in a faction (police)? For:

policegate = createObject(10184,-1631.4000244141,688.5,8.6999998092651,0,0,270) 
  
function policeo (thePlayer) 
  
 moveObject ( policegate, 300, -1631.4000244141,688.5,13) 
 end 
addCommandHandler("op",policeo) 
  
function policec (thePlayer) 
 moveObject ( policegate, 300, -1631.4000244141,688.5,8.6999998092651) 
 end 
  
addCommandHandler("cp",policec) 
  

Link to comment

This will open/close that gate only if the player is in the team called "police" :

policegate = createObject(10184,-1631.4000244141,688.5,8.6999998092651,0,0,270) 
  
function policeo (thePlayer) 
 local theTeam=getPlayerTeam(thePlayer) 
if theTeam then 
if getTeamName(theTeam)=="police" then 
 moveObject ( policegate, 300, -1631.4000244141,688.5,13) 
 end end end 
addCommandHandler("op",policeo) 
  
function policec (thePlayer) 
 local theTeam=getPlayerTeam(thePlayer) 
if theTeam then 
if getTeamName(theTeam)=="police" then 
 moveObject ( policegate, 300, -1631.4000244141,688.5,8.6999998092651) 
 end end end 
  
addCommandHandler("cp",policec) 

Link to comment

Currenltly I continue MTA Paradise project I've got polish server, but it's shit, everything fucks, too many things to edit.

I will help you, I know all the paradise, developed it one year ago and now too.

1. How to make colorful nicknames for factions?

- I will give u an example(its just a setPlayerNametagColor):

addCommandHandler( { "guard", "sacfguard" }, 
    function( thePlayer, commandName ) 
        if exports.players:isLoggedIn( thePlayer ) then 
            if exports.factions:isPlayerInFaction( thePlayer, 18 ) then -- if player who uses this command is in faction id 18 
                setElementModel ( thePlayer, 71 ) 
                setPedArmor ( thePlayer, 100 ) 
                giveWeapon ( thePlayer, 3, 1 ) 
                giveWeapon ( thePlayer, 24, 500 ) 
                giveWeapon ( thePlayer, 41, 100 ) 
                setPlayerNametagColor( thePlayer, 100, 0, 100 ) -- set his nametag color  
            else 
                outputChatBox( "(( You are not in SACF. ))", thePlayer, 255, 0, 0 ) 
            end 
        end 
    end 
) 

2. How to make a gates for factions?

- Make it like every gates but with exception isPlayerInFaction

  
local LSFDbarrierturn = createObject ( 968, 1667.9000244141, -1551.1999511719, 13.199999809265, 0, 270, 270 ) 
  
function szlabanLSFD(thePlayer,command) 
    if(exports.factions:isPlayerInFaction(thePlayer, 3)) then 
        outputChatBox("barrier turn .. bla bla bla.",thePlayer) 
        setElementRotation ( LSFDbarrierturn, 0, 360, 270 ) 
        setTimer (setElementRotation, 7500, 1, LSFDbarrierturn, 0, 270, 270  ) 
    else 
        outputChatBox( "(( You are not in LSFD. ))", thePlayer, 255, 0, 0 ) 
    end 
end 
addCommandHandler("lsfd", szlabanLSFD) 
  

3. How to showed the nick of the character's head?

take it ;p

http://www37.zippyshare.com/v/17174464/file.html

4. How to make a commands /repair for roadside assistance, /sethealth for medics, /freeze, /unfreeze, /mute, /unmute, /kick and /jail, /unjail for police? :)

-- write like every normal function but with

exports.factions:isPlayerInFaction(thePlayer, factionid) or

exports.factions:isPlayerInFactionType(thePlayer, factiontype)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...