Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Ma puteti ajuta cu ceva ,va rog mult !


Question

Posted

Am de ex

[pawn]if (strcmp(cmd, "/newpass", true) ==0 )

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");

            return 1;

        }

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "%s.ini", sendername);

        new tmppass[64];

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /newpass [newpassword]");

return 1;

}

strmid(tmppass, tmp, 0, strlen(cmdtext), 255);

Encrypt(tmppass);

OnPlayerChangePass(playerid,tmppass);

}

return 1;

}[/pawn]

Cum as putea baga ,un dialog ,de exp cand dai /newpass ,sa-ti apara o patratica unde sa scrii parola cea noua si cand dai enter sa se schimbe ,gen : qn50chvuydzs58olxak9.jpg

Daca puteti ,sa-mi puneti voi in comanda /newpass ,care am lasat-o mai sus un dialog dinasta.

10 answers to this question

Recommended Posts

Posted

Nu merge wiki vad momentan ,imi poti baga tu in comanda aia direct te rog mult ,daca nu tu [glow=red,2,300]altcineva[/glow]

Posted

pai nu esti marele scripter mQ sau saints parca?? aici pe forumul asta nu se cer comenzi, scripturi etc..

stuntman te'a ajutat cu maximul pe care putea sa il faca oricine asa ca descurcate

Posted

Nu merge wiki vad momentan ,imi poti baga tu in comanda aia direct te rog mult ,daca nu tu [glow=red,2,300]altcineva[/glow]

Oh, acum mi-am amintit: Daca vreti sa copiati, nu cereti ajutorul aici ! Oricum, uite:

pai nu esti marele scripter mQ sau saints parca?? aici pe forumul asta nu se cer comenzi, scripturi etc..

stuntman te'a ajutat cu maximul pe care putea sa il faca oricine asa ca descurcate

Pot si mai mult daca am chef. :]

//Sus in script
#define DIALOG_CHANGEPASS 1345

//Comanda

if( strcmp( cmdtext, "/newpass", true ) == 0 )
{
	if( gPlayerLogged[ playerid ] == 0 ) 
		return SendClientMessage( playerid, COLOR_GREY, "You are not logged yet !" );

	new npName[ MAX_PLAYER_NAME ], string[ 128 ];
	ShowPlayerDialog( playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_LIST, "{FFFFFF}Change your password:", "{FFFFFF}Scrie mai jos noua ta parola:", "Change", "Cancel" );
	return 1;
}

//Sub OnDialogResponse
if( dialogid == DIALOG_CHANGEPASS )
{
	if( !response ) return 1;

	if( strlen( listitem ) == 0 || strlen( listitem ) > 64 )
		return SendClientMessage( playerid, 0xFF0000FF, "ERROR: Invalid password lenght ! ( 1 - 64 chars )" );

	new tmppass[ 64 ];
	strmid( tmppass, listitem, 0, strlen( listitem ), 255 );
	Encrypt( tmppass );
	OnPlayerChangePass( playerid, tmppass );
}

Spune daca a mers.

PS: bRiLiAnT are dreptate, aici nu se cer scripturi.

Posted

Da ,niste erori :

[pawn]C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 204: symbol is assigned a value that is never used: "string"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 204: symbol is assigned a value that is never used: "npName"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300 -- 28306) : error 017: undefined symbol "dialogid"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300 -- 28308) : error 017: undefined symbol "response"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28310) : error 017: undefined symbol "listitem"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28314) : error 017: undefined symbol "listitem"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase[/pawn]

Posted

Da ,niste erori :

[pawn]C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 219: local variable "string" shadows a variable at a preceding level

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 204: symbol is assigned a value that is never used: "string"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300) : warning 204: symbol is assigned a value that is never used: "npName"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300 -- 28306) : error 017: undefined symbol "dialogid"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28300 -- 28308) : error 017: undefined symbol "response"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28310) : error 017: undefined symbol "listitem"

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(28314) : error 017: undefined symbol "listitem"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase[/pawn]

Greseala mea cele cu string si npName.

//Sus in script

#define DIALOG_CHANGEPASS 1345

//Sub OnPlayerCommandText, langa restul comenzilor

if( strcmp( cmdtext, "/newpass", true ) == 0 )

{

if( gPlayerLogged[ playerid ] == 0 )

return SendClientMessage( playerid, COLOR_GREY, "You are not logged yet !" );

ShowPlayerDialog( playerid, DIALOG_CHANGEPASS, DIALOG_STYLE_LIST, "{FFFFFF}Change your password:", "{FFFFFF}Scrie mai jos noua ta parola:", "Change", "Cancel" );

return 1;

}

//Sub OnDialogResponse

if( dialogid == DIALOG_CHANGEPASS )

{

if( !response ) return 1;

if( strlen( listitem ) == 0 || strlen( listitem ) > 64 )

return SendClientMessage( playerid, 0xFF0000FF, "ERROR: Invalid password lenght ! ( 1 - 64 chars )" );

new tmppass[ 64 ];

strmid( tmppass, listitem, 0, strlen( listitem ), 255 );

Encrypt( tmppass );

OnPlayerChangePass( playerid, tmppass );

}

Si pune-le unde am spus cu rosu mare !

Posted

Le-am pus dar :

[pawn]C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(13340) : error 035: argument type mismatch (argument 1)

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(13344) : error 035: argument type mismatch (argument 2)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

[/pawn]

Posted

Le-am pus dar :

[pawn]C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(13340) : error 035: argument type mismatch (argument 1)

C:\Users\Francisc\Desktop\Dur\eMAV RolepLay\gamemodes\NVL.pwn(13344) : error 035: argument type mismatch (argument 2)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

[/pawn]

Da, si care-s liniile alea ? Trebuie sa "smulg" totul de la tine de pe "limba" ?
Posted

13340 : [pawn]if( strlen( listitem ) == 0 || strlen( listitem ) > 64 )[/pawn]

13344 : [pawn]strmid( tmppass, listitem, 0, strlen( listitem ), 255 );[/pawn]

Posted

13340 : [pawn]if( strlen( listitem ) == 0 || strlen( listitem ) > 64 )[/pawn]

13344 : [pawn]strmid( tmppass, listitem, 0, strlen( inputtext ), 255 );[/pawn]

Oh, da, tot greseala mea, inlocuieste-le asa:

13340 : [pawn]if( strlen( inputtext ) == 0 || strlen( inputtext ) > 64 )[/pawn]

13344 : [pawn]strmid( tmppass, inputtext, 0, strlen( inputtext ), 255 );[/pawn]

PS: Pe viitor nu mai cere scripturi, sau voi fi nevoit sa iti dau amenda. ( Warn )

Guest
This topic is now closed to further replies.
×
×
  • 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.