Jump to content
  • 0

pomoc Hodnosti


Krt3c3k

Dotaz

Ahoj.chtěl bych se zeptat jak udělám že bych nastavil třeba sobě nebo nějakému hráči hodnost před jméno.

Napište mi prosím stránku kde bych to zjistil nebo mi napište kód.Děkuji. ;)


Myslím tyto hodnosti: Majitel,Hl.admin,Admin,VIP

Link to comment
Share on other sites

Recommended Posts

  • 0

new Hodnost[MAX_PLAYERS];

 

Hodnost[playerid] = ? ;

1 - Admin

2 - Hl. Admin

3 - Majitel

4 - Vip

 

 

OnPlayerText:

new Text[256];

if(Hodnost[playerid] == 0)

{

format(Text,256,"[Hráč]_ %s ID: %d : %s",GetPlayerName(playerid),playerid,text);

SendClientMessageToAll(Barva,Text);

}else if(Hodnost[playerid] == 1)

{

format(Text,256,"[Admin]_ %s ID: %d : %s",GetPlayerName(playerid),playerid,text);

SendClientMessageToAll(Barva,Text);

}

 

atd... atd... :)..Snad ti to pomohlo jako inspirace :)

Link to comment
Share on other sites

  • 0

Však se snaž, základ máš....

new Hodnost[MAX_PLAYERS];

PlayerText:

new Text[256];
if(Hodnost[playerid]== 0)
{
format(Text,256,"[Hráč]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 1)
{
format(Text,256,"[Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 2)
{
format(Text,256,"[Hl.Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 3)
{
format(Text,256,"[Majitel]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 4)
{
format(Text,256,"[VIP]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}
Link to comment
Share on other sites

  • 0

Já jsem nováček pawno dělám 1 měsíc a moc jsem se nenaučil tak mi pomož! Prosím :(


:) díky že si mi to napsal hele a jakej mám použít příkaz (abych to někomu nastavil na ID)

Link to comment
Share on other sites

  • 0

Má to 7 erroru tam to co si říkal že to mám výše to nejde -__- Má to 7 erroru!!


new Hodnost[MAX_PLAYERS];

PlayerText:

new Text[256];
if(Hodnost[playerid]== 0)
{
format(Text,256,"[Hráč]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 1)
{
format(Text,256,"[Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 2)
{
format(Text,256,"[Hl.Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 3)
{
format(Text,256,"[Majitel]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 4)
{
format(Text,256,"[VIP]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}

Todle myslím!

Link to comment
Share on other sites

  • 0
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(28) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(5) : error 020: invalid symbol name ""
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(6) : error 010: invalid function or declaration
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(8) : error 010: invalid function or declaration
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(8 -- 10) : error 010: invalid function or declaration
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(8 -- 11) : error 010: invalid function or declaration
C:\Users\Jan\Desktop\Mamciny soubory\hod.pwn(8 -- 11) : fatal error 107: too many error messages on one line
 
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
 
 
7 Errors.
Tydle -_-

Ty už mě tak napůl se**š :d Fakt sorry ale prosimtě napiš to už správně nebudu si tady s tebou každou minutu psát :d

Link to comment
Share on other sites

  • 0

new Hodnost[MAX_PLAYERS];

PlayerText:

new Text[256];
if(Hodnost[playerid]== 0)
{
format(Text,256,"[Hráč]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 1)
{
format(Text,256,"[Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 2)
{
format(Text,256,"[Hl.Admin]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 3)
{
format(Text,256,"[Majitel]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}else if(Hodnost[playerid]== 4)
{
format(Text,256,"[VIP]_ %s ID:%d : %s",GetPlayerName(playerid),playerid,text[0]);
SendClientMessageToAll(0x000000, Text);
return 0;
}

Link to comment
Share on other sites

  • 0

Jéžiš...

 

S tebou je to marný :DDD...

 

Pokud chceš pomoct ozvy se mi na skype :d..

 

Nechci spamovat příspěvkama o ničem :)))..

 

Skype : burysek..2

Link to comment
Share on other sites

  • 0

Troyy já to mylsím takle že nastavím hodnost to myslím jako prefix před jménem př:

[Admin]DemonCZE nebo [VIP]DemonCZE nebo [Hráč]DemonCZE [Majitel]DemonCZE a takový ne že budou jiný práva jo?

Link to comment
Share on other sites

  • 0

Jenže to nefunguje ;) já to nastavím a nic se nestane -_-


Dávám tam jako idiot /hodnost MojeID vyberu hodnost a nic se nestane před jménem to nemám _!! co ted ?! mluv

Link to comment
Share on other sites

  • 0

To taky chci -.- omg si tak tupej nebo co ??

todle byl příklad: dám /hodnost vyberu tam hodnost

a dá se mi to před jméno potom napíšu třeba bla bla a v chatu se objeví př.:

[Admin]DemonCZE:bla bla

todle jsem myslel!

Dokázal by si to udělat?! :)

Ale už bez chyb prosím :(


Udělal by mi to někdo prosím ? :)

Link to comment
Share on other sites

  • 0

jzs.. vždyť to tak myslím! k příkazu si nastavíš třeba:
if(AdminLevel <1) return SendClientMessage(playerid,0xFFFF00,"Nemáš dostatečná práva");
to znamená, pokud je někdo menší level než 1, tak nemůže uskutečnit příkaz

nebo:
if(AdminLevel >1) return SendClientMessageToAll(0xFFFF00,"[Admin]%s: %s",admin,text);
nadefinuješ si slovo admin a slovo text, to if adminlevel atd.. nevím jestli to mám správně
jestli bys potřeboval pomoc, stačí mi napsat na skype: troy585

Link to comment
Share on other sites

  • 0

kr3t3cek ty si fakt taký tupý ako píšeš? :problem:
Kód ti písať nejdem, ti si stratený prípad, ale mohol by ti pomôcť wilszonov admin system, tam má tie hodnosti ako majitel atd.
Jeho skype ti dať nemôžem tak si daj zoznam učtov a tam si to najdi.
Aj keby si bol slepý, za mesiac kopírovania a kradnutia skriptov by si sa aspoň niečo naučil.

Edited by Tango
Link to comment
Share on other sites

  • 0
#include <a_samp>

new Hodnost[MAX_PLAYERS];

new HodnostNazev[][] = {
	"Nováček",//Hodnost[playerid] = 0;
	"Hráč",//Hodnost[playerid] = 1;
	"Admin",//Hodnost[playerid] = 2;
	"Hl.Admin"//Hodnost[playerid] = 3;
};

public OnPlayerText(playerid,text[])
{
	new string[144];
        format(string,sizeof(string),"[%s] %s (%d): %s",HodnostNazev[Hodnost[playerid]],Jmeno(playerid),playerid,text);
	SendClientMessageToAll(GetPlayerColor(playerid),string);
	return 0;
}

stock Jmeno(playerid)
{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	return name;
}

Enjoy copying and remains stupid :)

Link to comment
Share on other sites

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
×
×
  • Create New...