16.12.2011, 19:57
Here's my OnPlayerRequestClass:
Why when I join the server the dialog doesn't appear? The message "Welcome to San Andreas: RPG" appears. Why it doesn't print anything? No print at all, I tried to debug it.
NOTE: This happened when I updated to 0.3d R2.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "{ffffff}•• {00ffff}Welcome to {000000}Sa{ff0000}n {ff9900}And{cccc00}re{00cc00}as {00ffff}R{00cccc}P{0000ff}G. {ffffff}••");
SetPlayerInterior(playerid,0);
SetPlayerFacingAngle(playerid, 266.9181);
SetPlayerCameraPos(playerid,-1856.5886,875.8010,198.8736); //join camera
SetPlayerCameraLookAt(playerid,-1856.5886,875.8010,198.8736);
TogglePlayerControllable(playerid, 0);
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
if(strcmp(pName,fOwner,false,strlen(pName)) == 0) return PlayerJob[playerid] = 1;
if(strcmp(pName,fZam[0],false,strlen(pName)) == 0) return PlayerJob[playerid] = 2;
if(strcmp(pName,fZam[1],false,strlen(pName)) == 0) return PlayerJob[playerid] = 2;
for(new i=0; i<10; i++)
{
if(strcmp(pName,fDriver[i],false,strlen(pName)) == 0) return PlayerJob[playerid] = 3;
if(strcmp(pName,fCombainer[i],false,strlen(pName)) == 0) return PlayerJob[playerid] = 4;
}
print("0"); //
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
{
print("1"); //
new bac[500];
new name[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(playerid, playername, sizeof(playername));
format(bac, sizeof(bac), "%s.ini", playername);
print("2"); //
if(gPlayerAccount[playerid] != 0)
{
print("3"); //
format(bac, sizeof(bac),"{666666}______________________________________\n\n Welcome to SA:RPG{666666}\n This account is registered\n\nLogin: %s\nEnter password below:\n______________________________________", name);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"Login",bac,"Login","Cancel");
print("4"); //
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
format(bac, sizeof(bac),"{666666}______________________________________\n\n Welcome to SA:RPG{666666}\n Register a new character\n\nLogin: %s{666666}\nEnter password below:\n______________________________________", name);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_PASSWORD,"Register",bac,"Done","Cancel");
return 1;
}
}
print("5"); //
return 1;
}
NOTE: This happened when I updated to 0.3d R2.