Jump to content
  • 0

Problema Login Textdraw, poate sa ma ajute cineva?


Question

Posted

Salutare, am o problema la un sistem de logare pe textdraw. Nu am erori, dar nu ma lasa sa selectez.

COD: 

                format(string, sizeof(string), "Name: %s", GetName(playerid));
                PlayerTextDrawSetString(playerid, LoginPTD[0], string);
                PlayerTextDrawSetString(playerid, LoginPTD[1], "Password: ~b~click");
                format(string, sizeof(string), "Last Login:~n~%s", laston);
                PlayerTextDrawSetString(playerid, LoginPTD[2], string);

                for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, LoginPTD);
                for(new i = 0; i < 2; i++) TextDrawShowForPlayer(playerid, LoginTD);
                SelectTextDraw(playerid, 0xFFFFF00FF);

 

                  if(playertextid == LoginPTD[1]) ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD, "Login", "Insert your password in the dialog below!", "Login", "Quit");

Nu stiu daca este nevoie sa va arat mai mult, poate sa ma ajute cineva pana maine va rog? :)

8 answers to this question

Recommended Posts

  • 0
Posted

Redefineste LoginPTD...

new PlayerText:LoginPTD[3][MAX_PLAYERS];
format(string, sizeof(string), "Name: %s", GetName(playerid));
PlayerTextDrawSetString(playerid, LoginPTD[0][playerid], string);

PlayerTextDrawSetString(playerid, LoginPTD[1][playerid], "Password: ~b~click");
format(string, sizeof(string), "Last Login:~n~%s", laston);
PlayerTextDrawSetString(playerid, LoginPTD[2[playerid]], string);

for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, LoginPTD[i][[playerid]);
for(new i = 0; i < 2; i++) TextDrawShowForPlayer(playerid, LoginTD);
SelectTextDraw(playerid, 0xFFFFF00FF);
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == LoginPTD[1][playerid]) 
    {
        ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD, "Login", "Insert your password in the dialog below!", "Login", "Quit");
		return 1;
    }
    return 0;
}

Inlocuieste peste tot unde folosesti LoginPTD[numar] cu LoginPTD[numar][playerid].

  • 0
Posted (edited)
Acum 4 ore, NuamNume a spus:

Salutare, am o problema la un sistem de logare pe textdraw. Nu am erori, dar nu ma lasa sa selectez.

COD: 

                format(string, sizeof(string), "Name: %s", GetName(playerid));
                PlayerTextDrawSetString(playerid, LoginPTD[0], string);
                PlayerTextDrawSetString(playerid, LoginPTD[1], "Password: ~b~click");
                format(string, sizeof(string), "Last Login:~n~%s", laston);
                PlayerTextDrawSetString(playerid, LoginPTD[2], string);

                for(new i = 0; i < 3; i++) PlayerTextDrawShow(playerid, LoginPTD);
                for(new i = 0; i < 2; i++) TextDrawShowForPlayer(playerid, LoginTD);
                SelectTextDraw(playerid, 0xFFFFF00FF);

 

                  if(playertextid == LoginPTD[1]) ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD, "Login", "Insert your password in the dialog below!", "Login", "Quit");

Nu stiu daca este nevoie sa va arat mai mult, poate sa ma ajute cineva pana maine va rog? :)

Folosesti 

OnPlayerClickPlayerTextDraw

Dar tu ai un textdraw global.

Adauga

if(playertextid == LoginPTD[1]) ShowPlayerDialog(playerid, DIALOG_LOGIN2,DIALOG_STYLE_PASSWORD, "Login", "Insert your password in the dialog below!", "Login", "Quit");

Sub

OnPlayerClickTextDraw

Dar te sfatuiesc sa folosesti textdraw per player si nu globale, doar textdraw-urile de tip nume/logo/ceas poti sa le lasi pe global, tot ce se poate selecta sau schimba din gamemode si are o eficienta mai mare precum asta pot aparea probleme, daca sunt +2 jucatori eu pot selecta si sa ne faca actiunea amandurora.

Edited by StrikerM

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

  • 0
Posted

C:\Users\Raul\Downloads\burned.ro\gamemodes\wa-rpg.pwn(2723) : error 017: undefined symbol "playertextid"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
[Finished in 68.9s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'C:\\Users\\Raul\\Downloads\\burned.ro\\gamemodes\\wa-rpg.pwn', '-;+']]
[dir: C:\Users\Raul\Downloads\burned.ro\gamemodes]
[path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\]

  • 0
Posted

tu ai pus la 'onplayerclicktextdraw' du-te la 'onplayerclickplayertextdraw'

  • 0
Posted
1 oră în urmă, hanako a spus:

tu ai pus la 'onplayerclicktextdraw' du-te la 'onplayerclickplayertextdraw'

Salut, nu o zic cu rautate ... dar citeste inainte sa raspunzi, i-am explicat deja ce sa faca.

@BaFFyJunior

Salut, daca le dai mura in gura nu o sa invete niciodata si mereu o sa ceara asa scripturi, mai sus eu i-am explicat exact ce sa faca.

@NuamNume

Salut, ai mutat sub onplayerclicktextdraw asa ca o sa folosesti clickedid inloc de playertextid.

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

  • 0
Posted

Nu merge oricum va multumesc mult.

 

C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4571) : error 033: array must be indexed (variable "LoginPTD")
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4572) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4573) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4574) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4575) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4576) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4577) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4578) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4579) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4580) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4581) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4582) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4583) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4584) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4586) : error 033: array must be indexed (variable "LoginPTD")
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4587) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4588) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4589) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4590) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4591) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4592) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4593) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4594) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4595) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4596) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4597) : error 035: argument type mismatch (argument 2)

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
[Finished in 50.6s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'C:\\Users\\Raul\\Downloads\\burned.ro\\gamemodes\\wa-rpg.pwn', '-;+']]
[dir: C:\Users\Raul\Downloads\burned.ro\gamemodes]
[path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\]

Am facut exact ce a zis baffy

  • 0
Posted (edited)

Salut, trebuie sa mărești floatu de la PlayerTextDrawLetterSize daca a fost făcute cu tde editor. Ex Daca ai (0.0...., x.x) pune (15.0, x.x) x.x = ce float ai tu acolo.

Edited by HPQ123
  • 0
Posted

Trebuie sa il definesti in totalitate din textdraw global in unu per player.

Acum 17 ore, NuamNume a spus:

Nu merge oricum va multumesc mult.

 

C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4571) : error 033: array must be indexed (variable "LoginPTD")
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4572) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4573) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4574) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4575) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4576) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4577) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4578) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4579) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4580) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4581) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4582) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4583) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4584) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4586) : error 033: array must be indexed (variable "LoginPTD")
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4587) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4588) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4589) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4590) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4591) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4592) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4593) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4594) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4595) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4596) : error 035: argument type mismatch (argument 2)
C:\Users\Raul\Downloads\burned.ro\pawno\include\systems.inc(4597) : error 035: argument type mismatch (argument 2)

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
[Finished in 50.6s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'C:\\Users\\Raul\\Downloads\\burned.ro\\gamemodes\\wa-rpg.pwn', '-;+']]
[dir: C:\Users\Raul\Downloads\burned.ro\gamemodes]
[path: C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\]

Am facut exact ce a zis baffy

 

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.