[ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
I Want To Make the Thing Whent Player login failed
I already Have Dialog
Can Anyone Help ?
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
DanishHaq - 22.09.2013
What do you want? A dialog instead of the text?
If so, use strcat:
pawn Код:
new dialogstring[100], string[600]; // don't have time to count them
format(dialogstring, sizeof(dialogstring), "LINE 1", values);
strcat(dialogstring, string);
format(dialogstring, sizeof(dialogstring), "LINE 2", values);
strcat(dialogstring, string);
format(dialogstring, sizeof(dialogstring), "LINE 3", values);
strcat(dialogstring, string);
format(dialogstring, sizeof(dialogstring), "LINE 4", values);
strcat(dialogstring, string);
format(dialogstring, sizeof(dialogstring), "LINE 5", values);
strcat(dialogstring, string);
format(dialogstring, sizeof(dialogstring), "LINE 6", values);
strcat(dialogstring, string);
ShowPlayerDIalog(playerid, 1595, DIALOG_STYLE_MSGBOX, "Information", string, "Ok", "");
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
-_- I want To Make That Thing in pic Becuz i tryed Alot Of Time is didnt show
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
DanishHaq - 22.09.2013
Quote:
Originally Posted by donhu789
-_- I want To Make That Thing in pic Becuz i tryed Alot Of Time is didnt show
|
Show us what you've done then, codewise. Next time, explain it so it makes more sense, like "I want to make my server look like this when someone gets kicked / banned". Not "I Want To Make the Thing Whent Player login failed", what's the "thing"? You see.. that's how people get confused. Anyhow, show the code for what you've done already.
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
Your Failed Login Thinging See ?
I want to add that :\
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
Nah Never Mind It I done it But can you make My a Givemoney commands I accidently Detele :\
And I need to Add MOre Line In THis thing but How ?
PHP код:
CMD:stats(playerid,params[])
{
new pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
if(isnull(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
GetPlayerName(player1, playername, sizeof(playername));
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
new str[20][1000];
format(str[0],1000,"| ------ |COD Stats For %s's | ------- |\n", PlayerName2(player1));
strcat(str[1],str[0]);
format(str[2],1000,"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f\n", GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
strcat(str[1],str[2]);
format(str[3],1000,"Admin Level: %d | Moderator: %s | Rank: %s | Team: %s | Class: %s | Skin: %d\n", PlayerInfo[player1][Level], PlayerInfo[player1][Helper] ? ("Yes") : ("No"), GetRankName(player1), GetTeamName(player1), GetClass(player1), GetPlayerSkin(player1));
strcat(str[1],str[3]);
format(str[4],1000,"TimePlayed: [%d] hrs [%d] mins [%d] secs\n", h, m, s);
strcat(str[1],str[4]);
format(str[5],1000,"| ---------------------------------------------------- |");
strcat(str[1],str[5]);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",str[1],"OK","");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
return 1;
}
help ? = REp REP REP REP REP realy REP
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
DanishHaq - 22.09.2013
Quote:
Originally Posted by donhu789
Your Failed Login Thinging See ?
I want to add that :\
|
How is your player being logged in? Show us that code too.
Quote:
Originally Posted by donhu789
Nah Never Mind It I done it But can you make My a Givemoney commands I accidently Detele :\
And I need to Add MOre Line In THis thing but How ?
PHP код:
CMD:stats(playerid,params[])
{
new pDeaths, player1, h, m, s,playername[MAX_PLAYER_NAME];
if(isnull(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
GetPlayerName(player1, playername, sizeof(playername));
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
new str[20][1000];
format(str[0],1000,"| ------ |COD Stats For %s's | ------- |\n", PlayerName2(player1));
strcat(str[1],str[0]);
format(str[2],1000,"Scores: %d | Money: $%d | Kills: %d | Deaths: %d | K/D Ratio: %0.2f\n", GetPlayerScore(player1), GetPlayerMoney(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths);
strcat(str[1],str[2]);
format(str[3],1000,"Admin Level: %d | Moderator: %s | Rank: %s | Team: %s | Class: %s | Skin: %d\n", PlayerInfo[player1][Level], PlayerInfo[player1][Helper] ? ("Yes") : ("No"), GetRankName(player1), GetTeamName(player1), GetClass(player1), GetPlayerSkin(player1));
strcat(str[1],str[3]);
format(str[4],1000,"TimePlayed: [%d] hrs [%d] mins [%d] secs\n", h, m, s);
strcat(str[1],str[4]);
format(str[5],1000,"| ---------------------------------------------------- |");
strcat(str[1],str[5]);
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",str[1],"OK","");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
return 1;
}
help ? = REp REP REP REP REP realy REP
|
For the /stats, just copy and paste one of the format's and the strcat, and then paste it under one of the strcat's where you want to add something, and then simple add it. And make your own /givemoney command, that ain't hard either.
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
you want this

??
PHP код:
public OnPlayerConnect(playerid)
{
if (udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][LoggedIn] == 0)
{
new string[500];
format(string, sizeof(string),""cwhite"Welcome Back"cred"%s "cwhite" To Call Of Duty Wolrd At War\nYour Account Is Already Registered!\nEnter Your Password Below To Load Your Status\n(Score,Cash,rank,Kills,etc)", PlayerName2(playerid));
ShowPlayerDialog(playerid, 125, DIALOG_STYLE_PASSWORD, "Login Account",string,"Login","Kick");
}
}
if (!udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][Registered] == 0)
{
new string[200];
format(string, sizeof(string),""cwhite"Welcome "cred"%s "cwhite"To Call Of Duty Wolrd At War\nYour Account is not Registered!\nEnter your Password Below To Save Your Status\n(Score,Cash,Ranks,Kill,etc)", PlayerName2(playerid));
ShowPlayerDialog(playerid, 126, DIALOG_STYLE_PASSWORD, "Register Account",string,"Register","Kick");
}
}
if(PlayerInfo[playerid][LoggedIn] == 1)
{
new pname[128];
new file[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "Score", 0);
dini_IntSet(file, "Money", 0);
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
else
{
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
}
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
DanishHaq - 22.09.2013
Quote:
Originally Posted by donhu789
you want this  ??
PHP код:
public OnPlayerConnect(playerid)
{
if (udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][LoggedIn] == 0)
{
new string[500];
format(string, sizeof(string),""cwhite"Welcome Back"cred"%s "cwhite" To Call Of Duty Wolrd At War\nYour Account Is Already Registered!\nEnter Your Password Below To Load Your Status\n(Score,Cash,rank,Kills,etc)", PlayerName2(playerid));
ShowPlayerDialog(playerid, 125, DIALOG_STYLE_PASSWORD, "Login Account",string,"Login","Kick");
}
}
if (!udb_Exists(PlayerName2(playerid)))
{
if(PlayerInfo[playerid][Registered] == 0)
{
new string[200];
format(string, sizeof(string),""cwhite"Welcome "cred"%s "cwhite"To Call Of Duty Wolrd At War\nYour Account is not Registered!\nEnter your Password Below To Save Your Status\n(Score,Cash,Ranks,Kill,etc)", PlayerName2(playerid));
ShowPlayerDialog(playerid, 126, DIALOG_STYLE_PASSWORD, "Register Account",string,"Register","Kick");
}
}
if(PlayerInfo[playerid][LoggedIn] == 1)
{
new pname[128];
new file[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "Score", 0);
dini_IntSet(file, "Money", 0);
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
else
{
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
}
|
Ok, and what's your OnDialogResponse for the login dialog?
Re: [ZCMD]Help With Warning Whent Player Login Fail to server -
donhu789 - 22.09.2013
Nothnig :\ that my problem :\