problem with pickups
#1

hi i have this code:
pawn Код:
for( new i = 0; i < MAX_IE; i++ )
        {
            printf( "%i", i );
            //  && ie_data[ i ][ ie_created ]
            if( pickupid == ie_data[ i ][ ie_pickupid ] )
            {
                SuccesMSG( playerid, "veikia" );
                SetPlayerPos( playerid, ie_data[ i ][ ie_x ], ie_data[ i ][ ie_y ], ie_data[ i ][ ie_z ] );
                SetPlayerFacingAngle( playerid, ie_data[ i ][ ie_a ] );
                SetPlayerInterior( playerid, ie_data[ i ][ ie_int ] );
                if( ie_data[ i ][ ie_world ] != -1 ) SetPlayerVirtualWorld( playerid, ie_data[ i ][ ie_world ] );
                SetCameraBehindPlayer( playerid );
                if( strlen( ie_data[ i ][ ie_msg ] ) ) GameTextForPlayer( playerid, ie_data[ i ][ ie_msg ], 5000, 1 );
            }
            return true;
        }
under public OnPlayerPickUpPickup( playerid, pickupid )
and under ongamemodeinti
Quote:

CreateEnterExit( 0, -2286.7087, 174.4515, 35.3445, 204.2759, -166.5805, 1000.5234, 0.1, 14, 0, "~w~Drabuziu Parduotuve" );

and this one
pawn Код:
stock CreateEnterExit( ieworld, Float:iex, Float:iey, Float:iez, Float:iex2, Float:iey2, Float:iez2, Float:iea, ieinterior, ieworld2 = -1, iemsg[] = "", iemodel = 19198 )
    {
        for( new i = 0; i < MAX_IE; i++ )
        {
            if( ie_data[ i ][ ie_created ] ) continue;
            if( iemodel == 19198 ) ie_data[ i ][ ie_pickupid ] = CreateDynamicPickup( iemodel, 1, iex, iey, iez+0.4, ieworld, -1, -1, 300  );
            else ie_data[ i ][ ie_pickupid ] = CreateDynamicPickup( iemodel, 1, iex, iey, iez, ieworld, -1, -1, 300  );
            ie_data[ i ][ ie_x ] = iex2;
            ie_data[ i ][ ie_y ] = iey2;
            ie_data[ i ][ ie_z ] = iez2;
            ie_data[ i ][ ie_a ] = iea;
            ie_data[ i ][ ie_int ] = ieinterior;
            ie_data[ i ][ ie_world ] = ieworld2;
            format( ie_data[ i ][ ie_msg ], 128, "%s", iemsg );
            ie_data[ i ][ ie_created ] = 1;
            printf( "%i", i );
            return i;
        }
        return true;
    }
the pickup is created, but when i step on it nothing is hapining
Reply
#2

If you are using dynamic objects you should use OnPlayerPickUpDynamicPickup, check out the topic from the streamer plugin
Reply
#3

i fixed a little, the pickup 0 is working but pickup 1 is not
Quote:

for( new i = 0; i < MAX_IE; i++ )
{
printf( "%i", i );

shows me always 0, but it should show 1 when i'm on 1 pickup and 0 when i'm on 0 pickup
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)