06.03.2019, 18:56
PHP код:
//registertd.pwn
new PlayerText:VaraRegTD[MAX_PLAYERS][21];
static CreateRegisterTD(playerid)
{
VaraRegTD[playerid][7] = CreatePlayerTextDraw(playerid, 310.866607, 167.589218, "Lozinka");
PlayerTextDrawLetterSize(playerid, VaraRegTD[playerid][7], 0.178665, 0.799407);
PlayerTextDrawTextSize(playerid, VaraRegTD[playerid][7], 588.000000, 0.000000);
PlayerTextDrawAlignment(playerid, VaraRegTD[playerid][7], 1);
PlayerTextDrawColor(playerid, VaraRegTD[playerid][7], -1442775126);
PlayerTextDrawSetShadow(playerid, VaraRegTD[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, VaraRegTD[playerid][7], 1);
PlayerTextDrawBackgroundColor(playerid, VaraRegTD[playerid][7], 255);
PlayerTextDrawFont(playerid, VaraRegTD[playerid][7], 2);
PlayerTextDrawSetProportional(playerid, VaraRegTD[playerid][7], 1);
PlayerTextDrawSetSelectable(playerid, VaraRegTD[playerid][7], true);
return 1;
}
hook OnPlayerConnect(playerid)
{
CreateRegisterTD(playerid);
return 1;
}
ShowRegisterTD(playerid)
{
for(new i; i < 21; i++)
{
PlayerTextDrawShow(playerid, VaraRegTD[playerid][i]);
}
return 1;
}
//RegisterLogin.pwn
function Register(playerid)
{
/*TogglePlayerSpectating(playerid, true);
InterpolateCameraPos(playerid, 501.1220, -2123.5720, 61.1148, 599.5076, -1907.3519, 61.1148, 25000);
InterpolateCameraLookAt(playerid, 00.2217, -2123.1355, 60.7137, 598.5964, -1906.9376, 60.7237, 10000);
ClearChat(playerid, 64);*/
ShowRegisterTD(playerid);
PlayerRegistering[playerid] = true;
SelectTextDraw(playerid, -1);
return 1;
}
hook OP_ClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == VaraRegTD[playerid][7]) { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, D_NASLOV, "{1100FF}>> {FFFFFF}Dobro nam dosli na server.\n{1100FF}>> {FFFFFF}Ovo je proces registracijue. Unesite zeljenu lozinku\n{1100FF}>> {FFFFFF}Bez brige, duzina lozinke moze biti do 65 karaktera", D_UNESI, D_ODUSTANI); }
return 1;
}