24.03.2014, 17:35
hi i have this code:
under public OnPlayerPickUpPickup( playerid, pickupid )
and under ongamemodeinti
and this one
the pickup is created, but when i step on it nothing is hapining
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;
}
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" ); |
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;
}