PDA

View Full Version : [ZCMD]Help With Warning Whent Player Login Fail to server


donhu789
22/09/2013, 11:49 AM
I Want To Make the Thing Whent Player login failed

I already Have Dialog


Can Anyone Help ?

DanishHaq
22/09/2013, 11:50 AM
What do you want? A dialog instead of the text?

If so, use strcat:

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", "");

donhu789
22/09/2013, 11:58 AM
-_- I want To Make That Thing in pic Becuz i tryed Alot Of Time is didnt show

DanishHaq
22/09/2013, 12:01 PM
-_- 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.

donhu789
22/09/2013, 12:02 PM
Your Failed Login Thinging See ?
I want to add that :\

donhu789
22/09/2013, 12:05 PM
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 ?

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_STYL E_MSGBOX,"Player Stats",str[1],"OK","");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
return 1;
}


help ? = REp REP REP REP REP realy REP

DanishHaq
22/09/2013, 12:08 PM
Your Failed Login Thinging See ?
I want to add that :\

How is your player being logged in? Show us that code too.

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 ?

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

donhu789
22/09/2013, 12:09 PM
you want this ?????

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"));
}
}

DanishHaq
22/09/2013, 12:10 PM
you want this ?????

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?

donhu789
22/09/2013, 12:11 PM
Nothnig :\ that my problem :\

xganyx
22/09/2013, 12:11 PM
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 ?

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_STYL E_MSGBOX,"Player Stats",str[1],"OK","");
} else return SendClientMessage(playerid, red, "Player Not Connected!");
return 1;
}


help ? = REp REP REP REP REP realy REP

That's the one i help you... Why you don't use it? And please show us the command or OnDialogResponse to login...

donhu789
22/09/2013, 12:15 PM
OPs...............................Guy No Need More help I already Done :D I just Fixed



And I just Request One More Help But Can You Guy Help ?\


It is With teleport :\


When i compile my File I got this :\



C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14216) : error 017: undefined symbol "COLOR_BRIGHTRED"
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14217) : error 017: undefined symbol "TeleTimer"
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14217) : warning 215: expression has no effect
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14217) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14217) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14217) : fatal error 107: too many error messages on one line



this is my code


CMD:lsa(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,COLOR_BRIGHTRED,"You cannot escape your punishment!");
TeleTimer[playerid] = SetTimerEx("ttimer", 1000, true, "i",playerid);
tseconds[playerid] = 6;
format(tstring,45,"You Must wait %d seconds before teleporting", tseconds[playerid]-1);
if(PlayerInfo[playerid][Level] == 0) SendClientMessage(playerid,COLOR_LIGHTBLUE, tstring);
Tx[playerid] =1437.0569;
Ty[playerid] =-2493.9792;
Tz[playerid] =13.5547;
Ti[playerid] = 0;
new string[128];
new dsname[MAX_PLAYER_NAME];
format(telestring,43,"Los Santos Airport!");
GetPlayerName(playerid, dsname, sizeof(dsname));
format(string, sizeof(string), "{C3C3C3}**%s** {3CE01B}has just {FA0C24}teleported to {FAFA0C}Los {FA0C24}Santos{FAFA0C}((/Lsa))", dsname);
SendClientMessageToAll(COLOR_YELLOW, string);
ShowPlayerDialog( playerid, DIALOGID3+24, DIALOG_STYLE_LIST, "Vehicle Types", "Airplanes\nHelicopters\nBikes\nConvertibles\nIndus trial\nLowriders\nOff Road\nPublic Service Vehicles\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nTrailers\nUnique Vehicles\nRC Vehicles", "Select", "Cancel" );
SetTimerEx("setstunt",3000,0,"i", playerid);
return 1;
}

xganyx
22/09/2013, 12:23 PM
Put this at the top op your script

#define COLOR_BRIGHTRED 0xFF3333

And this under the include

new TeleTimer[MAX_PLAYERS];

P/S: Ê người việt nam à? Sao thấy chữ PhongLan ḱa =]]z

DanishHaq
22/09/2013, 12:24 PM
Nvm, do what the guy above told you.

xganyx
22/09/2013, 12:25 PM
? What

donhu789
22/09/2013, 12:29 PM
Ganny :D Yes

th́ sao Hả Chơi cái Này cũng vui nên Làm Tiếng Anh Luôn

Có FB Hay Skype hok

xganyx
22/09/2013, 12:32 PM
FB: nh0kdtdlmht@yahoo.com

Skype: nh0kdtdlmht@yahoo.com =]]z

Thằg Việt Nam thứ 5 ḿnh gặp trong forum =]]z Văi người Việt =]]z Sáng thấy cái tên donhu (Đỗ Như là nh́n bít việt nam rồi=]]z)

P/S: =]]z = =))

donhu789
22/09/2013, 12:32 PM
Gany Giúp Cái



errore nữa rối


C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14289) : error 017: undefined symbol "tseconds"
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14289) : warning 215: expression has no effect
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14289) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14289) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PhongLan\Desktop\Samp CS\gamemodes\codww.pwn(14289) : fatal error 107: too many error messages on one line

JimmyCh
22/09/2013, 12:37 PM
For god damn sake, this is English Section, go talk on what ever this language is section.

donhu789
22/09/2013, 12:37 PM
Jimmy I just Need Fix those error :\

DanishHaq
22/09/2013, 12:38 PM
Jimmy I just Need Fix those error :\

Put this at the top of your script:

new tseconds[MAX_PLAYERS];

xganyx
22/09/2013, 12:41 PM
add cái này ở dưới mấy cái #include

new tseconds[MAX_PLAYERS];

JimmyCh
22/09/2013, 12:41 PM
You could just post the thing before in English so we can help you..
I didn't understand whatever you wrote before that's why I said that.

donhu789
22/09/2013, 12:44 PM
And It Show another Commands Undefined tstring :\

xganyx
22/09/2013, 12:45 PM
Hey Are you Cena John on ******** i can help you....

donhu789
22/09/2013, 12:47 PM
Gany yes i'm Cena John On ******** :D xD

xganyx
22/09/2013, 12:49 PM
Why you don't speak to me than i can help you...

donhu789
22/09/2013, 12:51 PM
lol yes i did you didnt Review My Mesage ?