Offline transfer method, need help, offer rep ++:D
#1

Hi,
I try to do a comanda that you can transfer your money into an another account if it exists. I make this in dialogs. But here is the problem, when i type the PlayerName, where i want to transfer my moneys, the dialog don't make any move. I type the PlayerName and dialog dissapear and don't do anything.

Here is my dialog( It's just dialog response ):
Код:
if ( dialogid == MoveStats6 )
	{
		if ( !response ) return 1;
		if ( sscanf( inputtext, "s[128]", inputtext[ 0 ] ) ) return ShowPlayerDialog( playerid, MoveStats6, DIALOG_STYLE_INPUT, "Move Stats", "{E60000}ERROR: {ACACAC}Trebuie sa scrii numele player-ului caruia vrei sa-i transferi statisticile!\n\n{ACACAC}Acum scrie {E60000}numele jucatorului{ACACAC}, caruia vrei sa-i transferi statisticile( Bani )!", "Transfera", "Iesire" );
	    if ( IsPlayerConnected( inputtext[ 0 ] ) ) return ShowPlayerDialog( playerid, MoveStats6, DIALOG_STYLE_INPUT, "Move Stats", "{E60000}ERROR: {ACACAC}Playerul trebuie sa fie deconectat ca sa ii poti transfera banii!\n\n{ACACAC}Acum scrie {E60000}numele jucatorului{ACACAC}, caruia vrei sa-i transferi statisticile( Bani )!", "Transfera", "Iesire" );
	    if ( inputtext[ 0 ] == playerid ) return ShowPlayerDialog( playerid, MoveStats6, DIALOG_STYLE_INPUT, "Move Stats", "{E60000}ERROR: {ACACAC}Nu poti sa-ti transfer tie banii!\n\n{ACACAC}Acum scrie {E60000}numele jucatorului{ACACAC}, caruia vrei sa-i transferi statisticile( Bani )!", "Transfera", "Iesire" );
		if ( GetPlayerMoney( playerid ) == 0 ) return SendClientMessage( playerid, COLOR_ULTRARED, "ERROR: Ai 0 bani, deci nu poti transfera banii! {ACACAC}Actiune Intrerupta!" );

		new pMoney = GetPlayerMoney( playerid );
		new file[ 128 ], str[ 256 ];
		format( file, 128, "/ladmin/users/%s.sav", inputtext[ 0 ] );
		if ( !udb_Exists( inputtext[ 0 ] ) )
		{
		    format( str, sizeof( str ), "{E60000}ERROR: {ACACAC}Accountul cu numele %s nu exista!\n\n{ACACAC}Acum scrie {E60000}numele jucatorului{ACACAC}, caruia vrei sa-i transferi statisticile( Bani )!", inputtext );
	 		return ShowPlayerDialog( playerid, MoveStats6, DIALOG_STYLE_INPUT, "Move Stats", str, "Transfera", "Iesire" );
		}
		else
		{
		    ResetPlayerMoney( playerid );
			GivePlayerMoney( inputtext[ 0 ], pMoney );
			format( str, sizeof( str ), "SUCCES: {ACACAC}Ti-ai mutat toti bani pe numele %s", inputtext[ 0 ] );
			SendClientMessage( playerid, COLOR_GREEN, str );
		}
	}
?
Reply
#2

While the player is offline?
Reply
#3

Yes, player must be offline to work this transfer!
Reply
#4

Try contacting a good scripter...He may ask for a payament but he will make it work. I suggest you Calgon
Reply
#5

I post here because i know scripting( Not perfectlly ) and i just need to resolve this problem. Not to do all script, and pay for it.
Reply
#6

This is easy to make however what system you use to save files ? and what's called the line / field / variable in the file where the money is stored?
Reply
#7

I use LAdmin, but is edited by me...

The line what save money in %s.sav is called: "Moneys"
Reply
#8

BUMP UP!
Reply
#9

which file system are you using
Reply
#10

Dini, lethaldudb functions for LAdmin xD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)