Jump to content

Admin Script by Mort v2


Guest Mort

Recommended Posts

Zdravím,

 

tímto prosím moderátory o smazání viewtopic.php?f=22&t=22017 ..

 

Přináším sem můj AS verze druhá, vyzkoušeno, našrobeno, všechno funguje jak má ...

 

Příkazy:

 

Všichni: /admins ; / report ; /cmds

 

Admin lvl 1: /kick ; /ban ; /me ; /mute ; /unmute ; /freeze ; /unfreeze ; /var ; /goto ; /get ; /clearchat ; /belaone ; /slay ; /beback ; /nick ; /acheat ; /health

 

Admin lvl 2: /gw ; /gm ; /server ; /kickall

 

Download:

 

http://www.ulozto.cz/10051109/admin-pwn

 

Btw, na 105 - 135 řádku máte zbraně na anticheat .. ty zbraně které nechcete zakazovat tak smažte, zde máte pomoc: wikiiiiii

Link to comment
Share on other sites

Pekné, no levely a varovanie si mohol dať na PVars

 

Edit: neni tam spec "nene"

a ako vidím, dáš si zakázanú zbraň pomocou /gw a kickne ťa anticheat.. tam by si mohol pridať aby si ju nemohol dať

 

Edit2: ešte otázočka:

SetPlayerName(id,newname);

format(string,sizeof(string),"Administrátor %s nastavil hráči %s jiné jméno",PlayerName(playerid),PlayerName(id));

má byť úmyselne že napíše už zmenené meno?

Link to comment
Share on other sites

  • 6 months later...

public OnPlayerConnect(playerid)
{
new cesta[10+MAX_PLAYER_NAME];
format(cesta,sizeof(cesta),"/%s.admin",PlayerName(playerid));
Alvl[playerid] = dini_Int(cesta,"admin");
return true;
}

public OnPlayerDisconnect(playerid,reason)
{
if(Alvl[playerid] > 0)
{
	new cesta[10+MAX_PLAYER_NAME];
	format(cesta,sizeof(cesta),"/%s.admin",PlayerName(playerid));
	dini_IntSet(cesta,"admin",Alvl[playerid]);
}
return true;
}

Ukladá sa to samo... ale nevytvorí súbor, takže to nefunguje musíš urobiť

public OnPlayerDisconnect(playerid,reason)
{
if(Alvl[playerid] > 0)
{
	new cesta[10+MAX_PLAYER_NAME];
	format(cesta,sizeof(cesta),"/%s.admin",PlayerName(playerid));
               new File:file = fopen(cesta,io_write);
               format(cesta,sizeof(cesta),"admin=%d\r\n",Alvl[playerid]);
	fwrite(file,cesta);
               fclose(file);
}	
return true;
}

Link to comment
Share on other sites

Dík QWERe , a hele nešlo by udělat že když napíšou /admins tak by se jim ukázalo Žádnej Admin není na serveru , Pokud by ovšem žádnej admin na serveru nebyl , protože když napíšeš /admins a na serveru neni admin tak se ti nic neukáže , nevíš jak to udělat ?

Link to comment
Share on other sites

toto

QCMD:admins(playerid,params[])
{
new stringa[128],
string[MAX_PLAYER_NAME*6+120];
for(new i;i	{
    if(Alvl[i] > 0 && IsPlayerConnected(i))
    {
        format(stringa,sizeof(stringa),"%s {0000FF}: {FFFFFF}%s\n",PlayerName(i),Admins(i));
        strcat(string,stringa);
	}
}
ShowPlayerDialog(playerid,31000,DIALOG_STYLE_MSGBOX,"Online admini:",string,"OK","");
return true;
}

zmeň na

QCMD:admins(playerid,params[])
{
new stringa[128],
string[MAX_PLAYER_NAME*6+120],admincount;
for(new i;i	{
    if(Alvl[i] > 0 && IsPlayerConnected(i))
    {
        format(stringa,sizeof(stringa),"%s {0000FF}: {FFFFFF}%s\n",PlayerName(i),Admins(i));
        strcat(string,stringa);
admincount++;
	}
}
if(admincount == 0){
ShowPlayerDialog(playerid,31000,DIALOG_STYLE_MSGBOX,"Online admini:","Na servery bohužiaľ žiadny admin není online","OK","");
}esle{
ShowPlayerDialog(playerid,31000,DIALOG_STYLE_MSGBOX,"Online admini:",string,"OK","");
}
return true;
}

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