Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Pytanie]Skrypt.


Rekomendowane odpowiedzi

Opublikowano

Witam.

Mam małe pytanie dotyczące tworzenia listy danej pracy,chodzi mi o to iż tworzę skrypt który będzie tworzył tzw. FIRMY na moim serwerze i mam mały problem iż nie wiem jak zrobić coś takiego jak tag (coś takiego jak ma plugin Factions) oraz 2 pytanie dotyczące danego kawałka skryptu:

			if arg 1 is "list":
				if {%arg 2%.list::*} is not set:
					send "&a Nie ma zadnych firm"
					stop
				else:
					send "&aLista pracowników: &f%{%arg 2%.list::*}%"
					stop

Czy gdy po wpisaniu /firma list <nazwa firmy> pokaże mi się lista dodanych pracowników :

Tym oto kawałkiem skryptu dodaje się gracz do listy:

add %arg 3% to {%arg 2%.list::*}
Opublikowano

1. Chcesz zrobić TAG przed nickiem na czacie, przed nickiem w grze czy przed wiadomościami?

2. A gracza do zmiennej lepiej dodawać tak:

set {%arg 2%.list::%arg 3%} to "%arg 3%"
Opublikowano

Posiadamy skrytp:

options:
	tag: &9[RealCraft,com.pl]
variables:
	{firma.%player%.status} = false
	{firma.%player%.smr} = 0
	{firma.%player%.zab} = 0
	
command /firma [<text>] [<text>] [<text>]:
	aliases: g
	trigger: 
		argument 1 is "zaloz":
			if argument 2 is set: 
				if argument 3 is set:
					if {firma.%argument 2%.nazwa} is not set:
						if {firma.%argument 3%.tag} is not set:
							if {firma.%player%.status} is false:
								set {firma.%player%.status} to true
								set {firma.%player%.tag} to argument 2
								set {firma.%argument 2%.tag} to argument 2
								set {firma.%argument 2%.nazwa} to argument 3
								set {firma.%argument 2%.dom} to location of player
								set {firma.%argument 2%.lider} to player
								message "{@tag} &7Utworzyles firme &2%argument 2% &7 - &2%argument 3%"
							else:
								message "{@tag} &7Jestes juz w firmie!"
						else:
							message "{@tag} &7Istnieje juz firma o nazwie &2%argument 3%"
					else:
						message "{@tag} &7Istnieje juz firma o tagu &2%argument 2%"
				else:
					message "{@tag} &7Uzycie: &2/firma zaloz [Nazwa] [Motd]"
			else:
				message "{@tag} &7Uzycie: &2/firma zaloz [Nazwa] [Motd]"
				stop
				
		argument 1 is "dolacz":
			if argument 2 is set:
				if {firma.%argument 2%.tag} is set:
					if {firma.%player%.zapro} is argument 2:
						if {firma.%player%.status} is false:
							set {firma.%player%.status} to true
							delete {firma.%player%.zapro}
							set {firma.%player%.tag} to argument 2
							
							add player to {firma.list::*}
							
							message "{@tag} &7Dolaczyles do firmy &2%{firma.%argument 2%.nazwa}% &7- &2%argument 2%"
						else:
							message "{@tag} &7Jestes juz w firmie!"
					else:
						message "{@tag} &7Ta firma wcale Cie nie zaprosila!"
				else:
					message "{@tag} &7Nie znaleziono firmy o tagu &2%argument 2%"
			else:
				message "{@tag} &7Podaj tag firmy!"
				
		argument 1 is "opusc":
			if {firma.%player%.status} is true:
				set {firma.%player%.status} to false
				delete {firma.%player%.tag}				
				message "{@tag} &7Opusciles firme"
				stop
			else:
				message "{@tag} &7Nie jestes w zadnej firmie!"
				stop
				
		argument 1 is "info": 
			message "&7---------------------"
			if {firma.%player%.status} is true:
				message " &7Nazwa firmy: &2%{firma.%player%.tag}%"
				message " &7Motd firmy: &b%{firma.%{firma.%player%.tag}%.nazwa}%"
				message ""
				message " &7firma: &f[&2%{firma.%player%.tag}%&f]&b %{firma.%{firma.%player%.tag}%.nazwa}%"
			else:
				message " &7firma: &f-"
			message " &7Osoby w firmie: &2%{firma.%player%.list::*}% "
			message " &7Pieniadze firmy: "
			message "-----------------------"
			stop
		
					
		argument 1 is "zatrudnij":
			if {firma.%{firma.%player%.tag}%.lider} is player:
				if argument 2 is set:
					set {firma.%argument 2%.zapro} to {firma.%player%.tag}
					message "{@tag} &7Zaprosiles gracza &2%argument 2%"
					send "{@tag} &7Zostales zaproszony do firmy %{firma.%player%.tag}%!" to argument 2
				else:
					message "{@tag} &7Podaj nick gracza!"
			else:
				message "{@tag} &7Aby zapraszac graczy musisz byc liderem gildi!"
			stop
				
		argument 1 is "zwolnij":
			if {firma.%{firma.%player%.tag}%.lider} is player:
				if argument 2 is set:
					if {firma.%argument 2%.tag} is {firma.%player%.tag}:
						set {firma.%argument 2%.status} to false
						delete {firma.%argument 2%.tag}
						message "{@tag} &7Wyrzuciles gracza &2%argument 2% &7ze swojej firmy!"
						send "{@tag} &7Zostales wyrzucony z firmy!" to player
						stop
					else:
						message "{@tag} &7Nie znaleziono gracza o nicku &2%argument 2%"
				else:
					message "{@tag} &7Podaj nick gracza!"
			else:
				message "{@tag} &7Aby zapraszac graczy musisz byc liderem gildi!"
				stop

		argument 1 is not set:
			message "-------------------------------------------------"
			message "&2 /firma &7 - Pomoc dot. pluginu"
			message "&2 /firma zaloz [Nazwa] [Motd]&7 - Zaklada firme"		
			message "&2 /firma dolacz [Tag]&7 - Dolacza do firmy"
			message "&2 /firma opusc&7 - Opuszcza gildie"
			message "&2 /firma zatrudnij [Nick]&7 - Zatrudnia gracza do firmy"
			message "&2 /firma zwolnij [Nick]&7 - Zwalnia gracza z firmy"
			message "&2 /firam info &7- Pokazuje informacje o firmie"
			message "-------------------------------------------------"
			stop
on logout:
	if {firma.%{firma.%player%.tag}%.lider} is player:
		set {firma.%player%.lider} to true
		
on join:
	if {firma.%player%.lider} is true:
		set {firma.%{firma.%player%.tag}%.lider} to player

I co musze zrobic aby pokazywal sie TAg i aby dodawalo graczy do firmy oraz im tworzylo tag przed nickiem.

csHDdb6.png

Opublikowano

on chat:

broadcast "[%{firma.%player%.tag}%][%{gildia.%player%.tag (Czy jak ty tam masz zapisaną gildię)}%][RANGA] - nie wiem jak to zrobić [%name of player%] %message%"

 

Tylko nie możesz mieć pluginu na chat!

|----Jedyny serwis z darmowymi skinami!----|


|------------Darmowe-Skiny.PL---------------|


|----Skiny i przedmioty do CS:GO, TF2----|


|------------------------------------------------|


|DOTA2, WarFrame i innych gier ze Steama!|


|--------------Start: NIEDŁUGO!!!--------------|

Opublikowano

@up [RANGA] nie bedzie dzialac ...

Dlatego napisałem capslock'iem i dopisałem, że nie wiem jak to zrobić -.-... Czytaj dokladniej

|----Jedyny serwis z darmowymi skinami!----|


|------------Darmowe-Skiny.PL---------------|


|----Skiny i przedmioty do CS:GO, TF2----|


|------------------------------------------------|


|DOTA2, WarFrame i innych gier ze Steama!|


|--------------Start: NIEDŁUGO!!!--------------|

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...