Jump to content

Roach

Membru
  • Posts

    660
  • Joined

  • Last visited

    Never

Posts posted by Roach

  1. Foloseste SSCANF cu inputtext, adica asa:

    if( sscanf( inputtext, "s[24]", inputtext[ 0 ] ) )


    EDIT:

    	if ( dialogid == RegDialog )
    	{
            	if ( !response ) return Kick( playerd );
    
    		if( sscanf( inputtext, "s[24]", inputtext[ 0 ] ) )
    		{
    			new rstr[ 512 ];
    			format( rstr, sizeof( rstr ), "{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
    			return ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_INPUT, "{E60000}Register", rstr,"Register", "Let's Play" ), ( 0 );
    		}
    		if( IsNull( inputtext[ 0 ] ) )
    		{
    			new rstr[ 512 ];
    			format( rstr, sizeof( rstr ), "{E60000}ERROR!: {FFFFFF}You must type a password if you want to register!\n\n\n{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
    			return ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_INPUT, "{E60000}Register", rstr,"Register", "Let's Play" ), ( 0 );
    		}
    
    		if ( strlen( inputtext ) < 5 || strlen( inputtext ) > 24 )
    		{
    			new rstr[ 512 ];
    			format( rstr, sizeof( rstr ), "{E60000}ERROR!: {FFFFFF}The password must be between 6 and 24 characters!\n\n\n{FFFFFF}Welcome {FFFF00}%s {FFFFFF}on {0000BB}Romania {FFFF00}Apocalypse {E60000}Stunt\n\n{FFFFFF}Please register to save your stats!: {FF5500}Score, Money, Coins...\n{FF5500}Password:", PlayerName( playerid ) );
    			return ShowPlayerDialog( playerid, RegDialog, DIALOG_STYLE_INPUT, "{E60000}Register", rstr,"Register", "Let's Play" ), ( 0 );
    		}
    
    		if ( udb_Create( PlayerName2( playerid ), inputtext ) )
    		{
    			new file[ 256 ], tmp3[ 100 ];
    			new strdate[ 20 ], year,month,day;	getdate( year, month, day );
    
    			format( file, sizeof( file ), "/ladmin/users/%s.sav", udb_encode( PlayerName( playerid ) ) );
    			GetPlayerIp( playerid, tmp3, 100 );	dini_Set( file, "ip", tmp3 );
    			// dini_Set( file, "password", inputtext );
    			dUserSetINT( PlayerName2( playerid ) ).( "Registered", 1 );
    			format( strdate, sizeof( strdate ), "%d/%d/%d", day, month, year );
    			dini_Set( file, "RegisteredDate", strdate );
    			dUserSetINT( PlayerName2( playerid ) ).( "LoggedIn", 1 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Banned", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Level", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Vip", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "LastOn", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Moneys", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Kills", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Deaths", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Hours", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Minutes", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Seconds", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Coins", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "DeathMatchScore", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "RaceScore", 0 );
    			dUserSetINT( PlayerName2( playerid ) ).( "Rank", 0 );
    			PlayerInfo[ playerid ][ LoggedIn ] = 1;
    			PlayerInfo[ playerid ][ Registered ] = 1;
    			SendClientMessage( playerid, COLOR_GREEN, "ACCOUNT: {FFFFFF}You are now registered, and have been automaticaly {33AA33}Logged In!" );
    			PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 );
    		}
    		return 1;
        }

  2. Razvane eu asa Mam obisnuit si asa imi place :|


    [pawn]if( !strcmp( cmdtext, "/chat" ) )

    {

      if( GetPlayerState( playerid ) == 0 ) return SendClientMessage( playerid, -1, "ERROR: You are not On Foot !" );

      if( GetPVarInt( playerid, "cAnim" ) == 0 )

      {

          ApplyAnimation( playerid, "PED", "factalk", 4.1, 1, 0, 1, 0, 0 );

          SetPVarInt( playerid, "cAnim", 1 );

      }

      else

      {

          ClearAnimations( playerid );

          SetPVarInt( playerid, "cAnim", 0 );

      }

      return ( 1 );

    }[/pawn]

    Puneo la OnPlayerCommandText

  3. lol

    [pawn]

    CMD:chat(playerid,params[ ]) {

    TogglePlayerControllable(playerid, true);

    return 1;

    }

    [/pawn]

    daca dadeai un mic search, gaseai foarte usor

    Gresit!


    CMD:chat( playerid )

    {

    if( GetPlayerState( playerid ) == 0 ) return SendClientMessage( playerid, -1, "ERROR: You are not On Foot !" );

    if( GetPVarInt( playerid, "cAnim" ) == 0 )

    {

    ApplyAnimation( playerid, "PED", "factalk", 4.1, 1, 0, 1, 0, 0 );

    SetPVarInt( playerid, "cAnim", 1 );

    }

    else

    {

    ClearAnimations( playerid );

    SetPVarInt( playerid, "cAnim", 0 );

    }

    return ( 1 );

    }


    Daca erati atenti Amandoi, Functia ApplyAnimation Are implementat FREEZE

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