Jump to content

Faction System


xXGhostXx

Recommended Posts

Posted
2 hours ago, AncienT said:

What?

i want faction system !

Abilitys :

1. Promote leader by Admin ACL group

2. Haves ranks faction : Rank 1 - Rank 2 - Rank 3 - Rank 4 - Rank 5 - Sub-Leader - Leader

3. Set rank faction members . /setrank <PartOfName> <Number> ( By Leader )

4. Haves faction vehicle .

5. Respawn all vehicle in faction HQ by Leader and Sub-Leader. /respawnveh

6. Demote leader by Admin

7. Color name in nametags and scoreboard for factions.

 

Posted
Just now, xXGhostXx said:

i want faction system !

Abilitys :

1. Promote leader by Admin ACL group

2. Haves ranks faction : Rank 1 - Rank 2 - Rank 3 - Rank 4 - Rank 5 - Sub-Leader - Leader

3. Set rank faction members . /setrank <PartOfName> <Number> ( By Leader )

4. Haves faction vehicle .

5. Respawn all vehicle in faction HQ by Leader and Sub-Leader. /respawnveh

6. Demote leader by Admin

7. Color name in nametags and scoreboard for factions.

 

This is group system?

Posted (edited)
executeSQLQuery

dbConnect
dbQuery
dbPoll

Use what you like db functions, or executeSQLQuery functions.
this is all functions you need.
except simple functions like: outputChatbox, and i think you don't wanna to consider it.

And i prefer to use SQL with system like this, not recommended to use Admin ACL.

Edited by iMr.WiFi..!

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted
4 minutes ago, iMr.WiFi..! said:

executeSQLQuery

dbConnect
dbQuery
dbPoll

Use what you like db functions, or executeSQLQuery functions.
this is all functions you need.
except simple functions like: outputChatbox, and i think you don't wanna to consider it.

And i prefer to use SQL with system like this, not recommended to use Admin ACL.

You suggest to make ACL ?

Posted
Just now, xXGhostXx said:

You suggest to make ACL ?

No, i said it's not good to use acl with system you want.

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted
Just now, xXGhostXx said:

 

How can i make respawn vehicle script ?

  • Save the spawn positions into SQL.
  • Get the spawn positions from SQL.
  • Spawn the vehicle with positions you get. 

 

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted
1 minute ago, iMr.WiFi..! said:
  • Save the spawn positions into SQL.
  • Get the spawn positions from SQL.
  • Spawn the vehicle with positions you get. 

 

i have a question :

This is my code for Admin PM Script.

Admin PM from admin to players.

function adminpm ( thePlayer, command, taraf,... )
  local message = table.concat ({...}, " ") 
 if not ( isPlayerOnGroup ( thePlayer ) ) then
    outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true)
    return false
  end
  
  if taraf == nil then
    outputChatBox("#00ff00Bezan: /pm <PartOfName> <Matn>", thePlayer, 255, 255, 255, true)
      return false
    end
	
	
    
  if not findPlayer(taraf) then
    outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true)
    return false
  end
    
  local playerpm = findPlayer(taraf)
  local nameadmin = getPlayerName( thePlayer )
  outputChatBox("#F39C12<< Be " ..taraf.. ": " ..message.. " >>", thePlayer, 255, 255, 255, true)
  outputChatBox("#F39C12<< [Admin PM] " ..nameadmin.. ": " ..message.. " >>", playerpm, 255, 255, 255, true)
  end



addCommandHandler("pm", adminpm)

When i use /pm <PartOfName>
An empty message will be sent.

please fix my script :(

Posted
Just now, xXGhostXx said:

i have a question :

This is my code for Admin PM Script.

Admin PM from admin to players.


function adminpm ( thePlayer, command, taraf,... )
  local message = table.concat ({...}, " ") 
 if not ( isPlayerOnGroup ( thePlayer ) ) then
    outputChatBox("#ff0000[Error]: #ffffffShoma Dastresi Be In Dastoor Nadarid!", thePlayer, 255, 255, 255, true)
    return false
  end
  
  if taraf == nil then
    outputChatBox("#00ff00Bezan: /pm <PartOfName> <Matn>", thePlayer, 255, 255, 255, true)
      return false
    end
	
	
    
  if not findPlayer(taraf) then
    outputChatBox("#ff0000[Error]: #ffffffPlayer Peyda Nashod!", thePlayer, 255, 255, 255, true)
    return false
  end
    
  local playerpm = findPlayer(taraf)
  local nameadmin = getPlayerName( thePlayer )
  outputChatBox("#F39C12<< Be " ..taraf.. ": " ..message.. " >>", thePlayer, 255, 255, 255, true)
  outputChatBox("#F39C12<< [Admin PM] " ..nameadmin.. ": " ..message.. " >>", playerpm, 255, 255, 255, true)
  end



addCommandHandler("pm", adminpm)

When i use /pm <PartOfName>
An empty message will be sent.

please fix my script :(

Open another topic for this problem.

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

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...