Script, why work only id 0?
#1

Код:
if ( ( newkeys & KEY_SECONDARY_ATTACK ) && !( oldkeys & KEY_SECONDARY_ATTACK ) && ( Bit_Get( player_bench, playerid ) == false ) && ( !IsPlayerAttachedObjectSlotUsed( playerid, BENCH_PRESS_INDEX ) ) )
 	{
	    for( new o; o != sizeof bench_pos; o ++ )
     	{
	        if( IsPlayerInRangeOfPoint( playerid, 2.0, bench_pos[ o ][ 0 ], bench_pos[ o ][ 1 ], bench_pos[ o ][ 2 ] ) )
	        {
	            if( Bit_Get( bench_used, o ) == true )
	                return CallRemoteFunction( "OnPlayerStartBenchPress", "ii", playerid, 0 );

	            CallRemoteFunction( "OnPlayerStartBenchPress", "ii", playerid, 1 );

	            SetPlayerPos( playerid, bench_pos[ o ][ 0 ], bench_pos[ o ][ 1 ], bench_pos[ o ][ 2 ] );
	            SetPlayerFacingAngle( playerid, bench_pos[ o ][ 3 ] );
	            ApplyAnimation( playerid, "benchpress", "gym_bp_geton", 1, 0, 0, 0, 1, 0, 1 );

				Bit_Set( player_bench, playerid, true );
				Bit_Set( bench_used, o, true );

				SetPVarInt( playerid, "player_current_bench", o );
				SetPlayerCameraPos( playerid, bench_pos[ o ][ 0 ] - 1.5, bench_pos[ o ][ 1 ] + 1.5, bench_pos[ o ][ 2 ] + 0.5 );
				SetPlayerCameraLookAt( playerid, bench_pos[ o ][ 0 ], bench_pos[ o ][ 1 ], bench_pos[ o ][ 2 ] );

                TextDrawShowForPlayer( playerid, bench_power[ playerid ] );
                TextDrawShowForPlayer( playerid, bench_reps[ playerid ] );
				TextDrawShowForPlayer( playerid, bench_repslabel[ playerid ] );

				SetTimerEx( "attachBarBellToPlayer", 3800, 0, "ii", playerid, getClosestBarBell( playerid ) );
				SetPVarInt( playerid, "player_bench_timer", SetTimerEx( "updateBenchBar", 500, 1, "i", playerid ) );
	            break;
	        }
    	}
 	}
Help me please! THANKS
Reply
#2

Where did you put this?
Reply
#3

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
}

Only work id 0...
Reply
#4

Any idea?
Reply
#5

Help me PLS
Reply
#6

try to put before each IF or any decision instruction a message like SendClientMessage(playerid,-1,"BUG 1"); to the next one "BUG 2" etc. And take a look at the ids 1,2,3,4, what kind a bug they receive. I do the same trick in my scripts.. and it works always.
Reply
#7

Quote:
Originally Posted by AdrianG
Посмотреть сообщение
try to put before each IF or any decision instruction a message like SendClientMessage(playerid,-1,"BUG 1"); to the next one "BUG 2" etc. And take a look at the ids 1,2,3,4, what kind a bug they receive. I do the same trick in my scripts.. and it works always.
don't work...

This script: https://code.******.com/archive/p/cy...stem/downloads
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)