Jump to content
  • 0

Problema Login Textdraw, poate sa ma ajute cineva?


Go to solution Solved by BaFFyJunior,

Question

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? :)

Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
  • Solution

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].

Link to post
Share on other sites
  • 0
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 vorba de "Am gamemode unic" nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to post
Share on other sites
  • 0

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\]

Link to post
Share on other sites
  • 0
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 vorba de "Am gamemode unic" nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to post
Share on other sites
  • 0

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

Link to post
Share on other sites
  • 0

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
Link to post
Share on other sites
  • 0

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 vorba de "Am gamemode unic" nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.