30.11.2009, 08:14
![smiley](images/smilies/question.gif)
public OnPlayerConnect(playerid)
{
new str[200];
new ip[15];
new zone = GangZoneCreate(1522.6809, -1747.3173, 1611.6897, -1583.4691);
GangZoneShowForAll(zone, 0x0000BBAA);
PlayCrimeReportForPlayer(playerid,playerid,1);
logged[playerid]=false;
SetPlayerColor(playerid, 0xAFAFAFAA);
GetPlayerName(playerid, getplayername[playerid], 24);
GetPlayerIp(playerid, ip, sizeof(ip));
format(GetIDString[playerid], sizeof(GetIDString), "%s.txt", getplayername[playerid]);
printf("* LOG : (%d번) %s 접속 IP : %s", playerid, getplayername[playerid], ip);
if(dini_Exists(GetIDString[playerid]))
{
format(str,sizeof(str),"%s님 도둑 경찰 모드에 오신걸 환영합니다\n게임플레이를 위해 로그인을 해주세요\n패스워드를 입력해주세요",getplayername[playerid]);
SendClientMessage(playerid,0xFFD700AA,"*** 가입된 아이디가 있습니다, 로그인 해주세요");
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Ga me Login:",str,"로그인","취소");
return 1;
}
format(str,sizeof(str),"%s님 도둑 경찰 모드에 오신걸 환영합니다\n게임플레이를 위해 회원등록을 해주세요\n패스워드를 입력해주세요",getplayername[playerid]);
SendClientMessage(playerid,0xFFD700AA,"*** 가입된 아이디가 없습니다, 계정을 등록해주세요.");
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Ga me Register:",str,"가입","취소");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
/* 레지스터 1*/
if(response)
{
if(dialogid == 1){
if(strlen(inputtext)){
OnPlayerRegister(playerid, inputtext);
return 1;
}
SendClientMessage(playerid,0xFFD700AA,"*** 패스워드를 입력해주세요.");
return 1;
}
/* 로그인 2 */
if(dialogid == 2){
if(strlen(inputtext)){
OnPlayerLogin(playerid, inputtext);
return 1;
}
SendClientMessage(playerid,0xFFD700AA,"*** 패스워드를 입력해주세요.");
return 1;
}
}
return 1;
}
after enter login password, Input is word 9 more than client crash