Jump to content
  • 0

pomoc Ban


LuK3Z

Dotaz

Caw hele zase potrebuji help kdyz admin zada /prikazy objevi se mu dialog klikne na ban a muze zadat id a da mu ban nevite jak na to ? :) aspon ten ban bach chtel vedet

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0

Do OnPlayerCommandText:

 

dcmd(prikazy,7,cmdtext);

 

 

Někam dolů třeba mimo publicy:

 

dcmd_prikazy(playerid, params[])
{
ShowPlayerDialog(playerid,99,DIALOG_STYLE_LIST,"Příkazy","Ban","Vybrat","Zrušit");
return true;
}

 

 

Do public OnDialogResponse:

 

if(dialogid == 99)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT,"Ban","Napiš ID které chceš zabanovat","Vybrat","Zrušit");
}
}
return true;
}
if(dialogid == 100)
{
if(response)
{
new string[128],hrac = strval(inputtext);
if(!strlen(inputtext)) return SendClientMessage(playerid,-1,"Musíš zadat ID!");
if(!IsPlayerConnected(hrac)) return SendClientMessage(playerid,-1,"Hráč není připojen!");
format(string,sizeof(string),"Byl jste zabanován hráčem %s",PlayerName(playerid));
SendClientMessage(inputtext,-1,string);
format(string,sizeof(string),"Hráč %s byl zabanován hráčem %s",PlayerName(hrac),PlayerName(playerid));
SendClientMessageToAll(-1,string);
BanEx(hrac,string);
}
return true;
}
return false;
}

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 0

C:\Users\Lukin\Desktop\parkour.pwn(300) : error 035: argument type mismatch (argument 1)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

radek 300:SendClientMessage(inputtext,-1,string);

Link to comment
Share on other sites

  • 0

C:\Users\Lukin\Desktop\parkour.pwn(300) : error 035: argument type mismatch (argument 1)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

radek 300:SendClientMessage(inputtext,-1,string);

 

Hoď sem ten řádek 300 :)

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