03.04.2017, 18:56
Hello,
i'm trying to create a "Police" Database Textdraw. First of all, i'm creating a Dialog Input. In Dialog input window, should be Wrote the Player Name. When writing a Player Name, i want to check if the Player is found, and then get the Playername to new opened Textdraw Window.
For example:
i'm Writing a Demo_User in Dialog Input, after that, opens a new Textdraw Windows, with his name on it. If the player not found, send a CliendMessage
So far, i got that, but can't get the Player name, that i wrote, to Check the Player is register, and get on Textdraw.
Old Textdraw, where i clicking on Text, to open the Dialog_Input.
New Textdraw, where should the Playername be.
Thanks, a lot!
i'm trying to create a "Police" Database Textdraw. First of all, i'm creating a Dialog Input. In Dialog input window, should be Wrote the Player Name. When writing a Player Name, i want to check if the Player is found, and then get the Playername to new opened Textdraw Window.
For example:
i'm Writing a Demo_User in Dialog Input, after that, opens a new Textdraw Windows, with his name on it. If the player not found, send a CliendMessage
So far, i got that, but can't get the Player name, that i wrote, to Check the Player is register, and get on Textdraw.
Old Textdraw, where i clicking on Text, to open the Dialog_Input.
Код HTML:
Pdb[playerid][10] = CreatePlayerTextDraw(playerid, 75.000000, 204.399932, "Player_Search"); PlayerTextDrawLetterSize(playerid, Pdb[playerid][10], 0.398399, 1.577600); PlayerTextDrawTextSize(playerid, Pdb[playerid][6], 71.000000, 202.250228); PlayerTextDrawAlignment(playerid, Pdb[playerid][10], 1); PlayerTextDrawColor(playerid, Pdb[playerid][10], -1); PlayerTextDrawSetShadow(playerid, Pdb[playerid][10], 1); PlayerTextDrawSetOutline(playerid, Pdb[playerid][10], 0); PlayerTextDrawBackgroundColor(playerid, Pdb[playerid][10], 255); PlayerTextDrawFont(playerid, Pdb[playerid][10], 1); PlayerTextDrawSetProportional(playerid, Pdb[playerid][10], 1); PlayerTextDrawSetShadow(playerid, Pdb[playerid][10], 1); PlayerTextDrawSetSelectable(playerid, Pdb[playerid][10], true);
New Textdraw, where should the Playername be.
Код HTML:
Pdb_TR[playerid][7] = CreatePlayerTextDraw(playerid, 78.400001, 160.600006, pdb_zp_name); PlayerTextDrawLetterSize(playerid, Pdb_TR[playerid][7], 0.400000, 1.600000); PlayerTextDrawAlignment(playerid, Pdb_TR[playerid][7], 1); PlayerTextDrawColor(playerid, Pdb_TR[playerid][7], -5963521); PlayerTextDrawSetShadow(playerid, Pdb_TR[playerid][7], 1); PlayerTextDrawSetOutline(playerid, Pdb_TR[playerid][7], 0); PlayerTextDrawBackgroundColor(playerid, Pdb_TR[playerid][7], 255); PlayerTextDrawFont(playerid, Pdb_TR[playerid][7], 1); PlayerTextDrawSetProportional(playerid, Pdb_TR[playerid][7], 1); PlayerTextDrawSetShadow(playerid, Pdb_TR[playerid][7], 1);
Код HTML:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid) { if(_:playertextid != INVALID_TEXT_DRAW) { if(playertextid == Pdb[playerid][10]) // PDB_ZP { for(new j; j < 13; j++) PlayerTextDrawHide(playerid,Pdb[playerid][j]); CancelSelectTextDraw(playerid); IsPdbOpen[playerid] = 0; ShowPlayerDialog(playerid,DIALOG_PDB_ZP, DIALOG_STYLE_INPUT, "Database", "Enter a Player Name:", "Search", "Close"); } } return 1; }
Код HTML:
if(dialogid == DIALOG_PDB_ZP) { if(!response) // If they clicked 'Cancel' or pressed esc { SendClientMessage(playerid,0xFF0000,"Good Luck"); } else // Pressed ENTER or clicked 'Login' button { if(CheckPassword(playerid, inputtext)) { new pdb_zp_name[MAX_PLAYER_NAME]; strmid(pdb_zp_name,cmdtext[5],0,MAX_PLAYER_NAME); for(new k; k < 15; k++) PlayerTextDrawShow(playerid,Pdb_ZP[playerid][k]); IsPdbOpen[playerid] = 1; } else { SendClientMessage(playerid,0xFF0000,"* No player found!"); ShowPlayerDialog(playerid,DIALOG_PDB_ZP, DIALOG_STYLE_INPUT, "Database", "Enter a Player Name:", "Search", "Close"); } } return 1; }